Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

record producer script using Text (labels) instead of values

will_smith
Mega Guru

Hello ServiceNow community,

I have a record producer that is set up with three radio buttons. As an example, one of them has Text (label) of "Supply Chain" and a value of "supply_chain". In my script I have these writing out to the work notes via the following code example

desc += " \n| Oracle subcategory: " + producer.oracle_subcategory;

[...]

current.work_notes = desc;

When I run this I get the values for "producer.oracle_subcategory" when I want the text, is there an easy way to do this? In customer viewable notes "Supply Chain" looks much nicer than "supply_chain".

1 ACCEPTED SOLUTION

getDisplayValue 😃


View solution in original post

3 REPLIES 3

Jamsta1912
Tera Guru

Hello William,


Try this:



desc += " \n| Oracle subcategory: " + producer.oracle_subcategory.getChoiceValue();



I've not used it before with record producer variables, but it might work!



Jamie


No dice...


getDisplayValue 😃