Show the select box variable label instead of the value.

imkhan
Tera Contributor

Hi All,

I just have query, we are using a multirow variable set, and we have a variable, so how do we show the variable label after selecting the choice from the select box instead of the value? We are getting data from a third party to show that is not storing in ServiceNow.

imkhan_0-1739983787556.png

 

22 REPLIES 22

imkhan
Tera Contributor

HI, yes, I had tried this way, but it was not suitable in our scenario. We required both a label and a value because the second variable is also getting data from a third party and dependent on the first variable value.

 

I have stored the key value in one variable, which is coming, but I am not able to set it on the target variable.

Ankur Bawiskar
Tera Patron
Tera Patron

@imkhan 

2 ways to handle

1) have choice label and value as same or when data is loaded into MRVS ensure the correct choice value is selected. Then it will show choice label

OR

2) Make that variable as single line text as you are just storing and user won't interact with the MRVS anyhow

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar ,

 

Our requirement is to store both the label and value, the label to show the user while selecting and after selecting on the catalog form, and store the value for the second variable, which is dependent on the first variable value. Based on that, we are also getting the second variable data.

 

Thank you!

@imkhan 

then how are you populating that MRVS? from 3rd party

If they are sending the correct choice value then it should show correct choice label

Did you check that?

Are they sending correct choice value or some garbage value and hence it's showing the invalid choice label

share what 3rd party is sending and how it's loaded to MRVS

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar ,

 

We are populating the select box with the help of Glide Ajax and script include and can see data is showing on the select box.

 

I have attached how we are setting up.

 

Thanks!