How to access the catalog item variable in script section of approval action in flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2020 07:28 AM
How to access the catalog item variable in script section of approval action in flow designer
- Labels:
-
flow designer
-
Multiple Versions
- 13,538 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2020 09:46 AM
Hi Sumit,
what you want to achieve by printing?
Can you explain that
Regards
Ankur
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-15-2020 10:34 AM
Hi Sumit,
you can use this and then below script should get the value in logs
1) Include this Action "Get Catalog Variables"
2) script below
/*
**Access Flow/Action data using the fd_data object. Script must return a value.
**example: var shortDesc = fd_data.trigger.current.short_description;
**return shortDesc;
*/
var val = fd_data._1__get_catalog_variables.date;
gs.info('Variable value is: ' + val);
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2020 07:50 PM
Hope you are doing good.
Let me know if I have answered your question.
If so, please mark appropriate response as correct & helpful so that this thread can be closed and others can be benefited by this.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2022 11:40 AM
Hello Ankur,
Thank you for the update above. I was trying to do the same to update short description of a catalog task when it is created but unfortunately it kept on returning [object gliderecord]
I did update the script as below and it worked fine. I was trying to update the short description with the requested for value.
Thanks,
Gopi

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2020 11:46 PM
Hi Sumit,
I have number in the field and I tried to return the field using just return statement below and I got the desired result.
return fd_data.trigger.request_item.variables.type_in_the_text
Kindly mark my response correct and helpful if my suggestion resolved your query,
Thanks
Murali