How to display a variable's label instead of its value on submitted record producer?

SusanWinKY
Kilo Sage

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':

find_real_file.png

Choices list:

find_real_file.png


Susan Williams, Lexmark
3 REPLIES 3

shloke04
Kilo Patron

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:



find_real_file.png



Regards,


Shloke


Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Treva1
Kilo Contributor

Can you show how it would look if I wanted to display Label name of Category or Topic instead of value name?

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:

find_real_file.png

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke