Add reference field value from variable to short description on RITM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2024 07:05 PM
I have a catalogue item that has a reference variable on the form that references the sys_user table. This cat item uses a flow.
In the flow I have an Update Record action where I would like to update the Short description with some default text then the value of this variable. I have used the variable data selector and can select the variable but on the submitted RITM the Short description displays the default test and the sys id of the selected user rather than the variables value.
How can I make it display the value if this variable on the Short description rather than the sys id please?
Thanks
- Labels:
-
Service Catalog
-
Service Desk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2024 09:42 PM
you need to dot walk to name field from that data pill for that reference variable
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2024 06:13 PM
I tried to do that, but I can't find the right path for the dot walking. I clicked on Trigger > Request Item Record > but from there I am unsure how to get to the variable option to select it. The crazy thing is I am sure I found it a few days ago but now I can't seem to find it. Are you able to advise the correct dot walking path using the data picker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2024 11:41 PM
Hi @riskay123
if You have an option to script you can use this method variablename.getDisplayValue(); this will return value instead of Sys id
thank you,
If my response helped please mark it correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2024 11:58 PM
Thanks for your reply. I am still not having any luck when I try to use a script either. I do not know java script so please bear with me.
If I use the data picker the task does trigger but with the sys id rather than the value. If I add a script, then the task doesn't at all. I have never added a script in Flow Designer before, so I am thinking I am doing something wrong here. I have used them in them old Workflow canvas though. I am adding it in here. Is this the right spot?
I am aware that this script is not referencing the reference variable in this example. It is just a string, so it does not contain the getDisplayValue(); bit. I am just trying to work out why the task does not trigger when I add a script first then I will try your suggestion from above.
When I run a test on the flow I get Error: "task" is not defined.,Detail: "task" is not defined.
Do you know what that means and how I can fix it?
Thanks in advance.