How to print reference field value in task short description

Harithapola
Tera Contributor

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.

3 REPLIES 3

AshishKM
Kilo Patron
Kilo Patron

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: 

AshishKM_1-1736543313038.png

 

 

-Thanks,

AshishKM

 


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

I used the same but it's not working, its working for list collector and other fields but not for reference field.

Ankur Bawiskar
Tera Patron
Tera Patron

@Harithapola 

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.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader