How to display a variable's label instead of its value on submitted record producer?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2017 09:43 PM
We have a record producer in the Service Catalog in our Service Portal. The record producer contains a couple of variables that dynamically retrieve their data from the sys_choice_list table via a script. When we view the submitted the form (we're using 'ticket' page), we see the variable's value instead of the variable's label. Is there any way to see the label? (please see screenshot for details)
Submitted 'ticket':
Choices list:
Susan Williams, Lexmark
- Labels:
-
Service Catalog
-
Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2017 09:45 PM
Hi,
In your record producer form, in the script section use the below code to have the value displayed:
current.field_name = producer.variable_name.getDisplayValue();
In the above code, Field_name is the backend field to which you are mapping after record producer submission. So kindly replace your field name and Variable name accordingly to get the expected result. Please see the screenshot below where you have to write the script in:
Regards,
Shloke
Regards,
Shloke

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2022 12:40 PM
Can you show how it would look if I wanted to display Label name of Category or Topic instead of value name?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2022 08:48 PM
Hi,
So the choices which you are having in your Record producer, instead of picking the backend value of those choices it will pick up the Display Value of them as shown below for example:
Say for example, when my form is submitted it will pick up the value shown in Red color below:
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke