- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2025 01:50 AM
Hello experts,
I am creating a flow designer in which in the output variable, i have comma seperated user's sysid's example
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
Hi @Deepika54 ,
I think you've created a custom action from flow designer. In this case why don't you return output as list reference type rather than string so you can use it directly in your main flow where you're using "Ask approval" activity.
Please follow below steps to modify your action output:
- Set output variable in script action as list reference to user table.
- In output create output variable of type list again.
- Click on exit edit mode and then set your output variable value with script step output value.
Once your action is setup then go back to your main flow and use above action output directly in your approval action like below:
Above solution will also work if you're using a subflow which is returning comma seperated string.
If my answer helps then please mark it helpful & accept this solution.
Thanks,
Utpal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Thank you for marking my response as helpful.
As per new community feature you can mark multiple responses as correct.
💡 If my response helped, please mark it as correct ✅ as well so that this helps future readers find the solution faster! 🙏
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-05-2025 01:11 AM
Hi @Deepika54 ,
The script field needs you to return a string that is created based on the syntax below. In my case, the approval will be approved or rejected if any users from that string of users will approve or reject. I'm using my flow variable and concatenate the list of sys_ids into the return string.
This is the different options available for you to use in Script.
| Approval | Script |
| Approved by any User | ApprovesAnyU[user_sys_id,user_sys_id] |
| Approved by 50% of Group | Approves50%G[group_sys_id] |
| Approved by 2 of Users or of Group | Approves2#U[user_sys_id,user_sys_id]G[group_sys_id] |
| Rejected by all Users | RejectsAllU[user_sys_id,user_sys_id] |
| Rejected by any user in Group | RejectsAnyG[group_sys_id,group_sys_id] |
| Approved or Rejected by any User | ApprovesRejectsAnyU[user_sys_id] |
| Approved by Group or Rejected by any User | ApprovesAnyG[group_sys_id]OrRejectsAnyU[user_sys_id] |
| All responded and anyone approves in Group | ApprovesResG[group_sys_id] |
Thanks,
Afrith
"If you feel this was helpful, Please mark this comment as helpful"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
Hi @Deepika54 ,
I think you've created a custom action from flow designer. In this case why don't you return output as list reference type rather than string so you can use it directly in your main flow where you're using "Ask approval" activity.
Please follow below steps to modify your action output:
- Set output variable in script action as list reference to user table.
- In output create output variable of type list again.
- Click on exit edit mode and then set your output variable value with script step output value.
Once your action is setup then go back to your main flow and use above action output directly in your approval action like below:
Above solution will also work if you're using a subflow which is returning comma seperated string.
If my answer helps then please mark it helpful & accept this solution.
Thanks,
Utpal
