Flow designer for a variable set multiple choice
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 03:13 AM
There is a variable set , in which it has multiple choice
Please select
A ,B
If 'A'option is selected it needs to create a catalog task for particular group(ex: 1234)
And if 'B' option is selected it needs to create a catalog task for particular group(ex: 6789)
How to add variables in flow variables as these are part of variable set, and how add these steps in flow designer.
If I am using for each item action in flow, then whatever option a or b then it is creating catalog task for a option. How can I resolve this? It needs to go for individual groups
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 03:16 AM
in the catalog task flow action you can use inline script and access variable value and then set group value
var variableValue = fd_data.trigger.request_item.variables.<variableName>; // give here the variable name
if(variableValue == 'A')
return 'group1SysId';
else if(variableValue == 'B')
return 'group2SysId';
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
11-13-2023 03:30 AM
Without scripting can't I do in flow designer by using for each item action.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2023 03:31 AM
you can using multiple IF else actions, but why to increase the number of flow steps when it can be simply done using flow's capability of inline scripting
I would recommend using that
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