Display text instead of value from Record Producer on form

Staxed
Giga Guru

Before I write a script to do this, I was wondering if there is an OOB way of showing the text of a catalog item variable instead of the value on a form.  I've been looking around for a while now and can't seem to find a way to do it OOB, so just want to make sure I'm not missing something before wasting time writing a script for it.

Catalog Item Variable options:

find_real_file.png

I need this to show the text instead of the value:

find_real_file.png

1 ACCEPTED SOLUTION

So In your record producer, value is gettng mapped instead of label

Since you are using map to filed from you record producer variable, your choice value is getting mapped.

 

Remove 'Map to Field'  and use producer script with below logic

current.u_var_strategic_alignment = producer.u_var_strategic_alignment.getDisplayValue();
//modify names accordingly.

Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

View solution in original post

5 REPLIES 5

Voona Rohila
Kilo Patron
Kilo Patron

Hi Staxed

OOTB It show text in front end and while accessing that variables in backend we will use values.

find_real_file.png

find_real_file.png

 

Navigate to "question_choice" table and verify which column has display value true.


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

The select box is showing the text correctly on the Catalog Item, it's the form on the backend that is showing the value.  Text is correctly set as the display value for the question_choice table.

Can you show the back-end form field dictionary?

how are you mapping the variable value to field?


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

Sure, it is being mapped by using the same value for it's name as the field it is mapping to.

find_real_file.png

find_real_file.png