Copy the variables label and value in to target record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
7 hours ago
Hi Every one,
I have record producer. After submitting the catalog i need copy all variables labe one value in to the description. I tried below script in record producer script. its working as expected, Can you please help on that
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
6 hours ago
Your script looks good and should work for most Record Producer use cases. It loops through all submitted variables, retrieves the variable label and display value, and appends them to the Description field of the target record.
A few notes:
- Using getDisplayValue() is recommended because it returns user-friendly values for reference, choice, and date fields.
- The check if (value) prevents empty variables from being included in the description.
- This approach will work for most variable types and makes it easier for fulfillers to view request details directly from the Description field.
If you need to include variables even when they are empty, you can remove the if (value) condition.
Overall, your script is correct and follows a standard approach for copying Record Producer variable labels and values into the target record description. ✅
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Hi @sivananda80
Script looks good. Test it once . what help you need as you stated script is working fine.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti