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.

push reference variable to string field

Andre8
Giga Guru

Hello, Im having trouble pushing the value of a variable on a record producer which is a reference field to a string field on the record. 

Andre8_0-1667220274025.png

This is the correct display value

Andre8_3-1667220437256.png

 

I would like to push to this field:

Andre8_1-1667220320758.png

When the record is submitted the sys_id is always displayed:

Andre8_2-1667220370695.png

 

1 ACCEPTED SOLUTION

Muhammad Khan
Mega Sage

Try this in record producer script.

current.<backend_name_of_dpas_site_field> = producer.<backend_name_of_reference_variable>.getDisplayValue();

 

Make sure to uncheck Map to field checkbox.

View solution in original post

1 REPLY 1

Muhammad Khan
Mega Sage

Try this in record producer script.

current.<backend_name_of_dpas_site_field> = producer.<backend_name_of_reference_variable>.getDisplayValue();

 

Make sure to uncheck Map to field checkbox.