How can i get value of catalog item variables in sc_req_item?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2022 03:56 AM
Hi. I used flow designer to send REST.
One variable needs catalog item variable in RITM, and i used sc_item_option_mtom. but it failed. security policy block my flow. so i want other ways.
thank you for help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2022 04:10 AM
Hi,
why not use Get Catalog Variables action in flow and then use that variable in your REST step.
Also possibly the user in whose session the flow is running doesn't have read access to table "sc_item_option_mtom"
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
07-25-2022 05:50 PM
Reason of not use Get Catalog Item is I need dynamic value.
I want value of catalog item in sc_req_item. But Get Catalog Variables can't do it.
Have you any way to find dynamic value using Get Catalog Variables?
If you have, Please teach me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2022 08:48 PM
Hi,
You can use Custom Action as script in the Flow and then query RITM again and fetch the latest value
That custom action will have 1 input variable i.e. RITM sysId and 1 output variable
Custom Action in ServiceNow Flow Designer
Something like this and then use output of this custom action in your next steps
(function execute(inputs, outputs) {
var ritmRec = new GlideRecord('sc_req_item');
ritmRec.get(inputs.sysId);
outputs.variableValue = ritmRec.variables.variableName;
// OR
// you can also query sc_item_option_mtom table with the RITM sysId and fetch the variable value and set in that output variable
})(inputs, outputs);
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader