How to print reference field value in task short description
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2025 09:00 AM
I have a reference field on catalog form named 'on behlaf of a colleague' which is reference to the user table and I want to populate the selected field value in the task short description.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2025 01:05 PM - edited ‎01-10-2025 01:09 PM
Hi @Harithapola ,
Either you are using the workflow [ or flow ] you can set the catalog task's short description with any catalog variable field values using the current.variables.<variableName>.getDisplayValue() in the advance script section.
Example:
-Thanks,
AshishKM
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2025 09:42 PM
I used the same but it's not working, its working for list collector and other fields but not for reference field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2025 10:32 PM
how are you creating the task?
via workflow or flow designer
Please share the variable configuration screenshot and your script used
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader