- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2023 02:50 AM
Hi Team,
I am working on a requirement where there is a select box variable with 16 question choices.
I need to assign the approval task to various people based on the value selected in the select box.
I have tried doing this in flow designer but it all became clumpsy and thereafter I also need to assign the sctask to various groups based on the select box value. Could you help out here ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2023 03:09 AM
you can use inline script for group field while you create the catalog task via flow
in that script check value of that choice variable and accordingly set the group sysId
var val = fd_data.trigger.request_item.variables.variableName;
if(val == 'choiceValue1')
return 'groupSysId1';
else if(val == 'choiceValue2')
return 'groupSysId2';
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
07-07-2023 03:09 AM
you can use inline script for group field while you create the catalog task via flow
in that script check value of that choice variable and accordingly set the group sysId
var val = fd_data.trigger.request_item.variables.variableName;
if(val == 'choiceValue1')
return 'groupSysId1';
else if(val == 'choiceValue2')
return 'groupSysId2';
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
07-07-2023 03:15 AM
Hi Ankur,
Thanks for your reply.
May I know how can I auto assign the approval task based on the selection of select box variable ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2023 03:20 AM
that's what I shared above how to assign group based on choice
what else is required?
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-07-2023 03:22 AM
Yes. I got the Group part. But how to assign the approval tasks to approvers from sys_user ?