Flow Designer Approvals from List of Approvers Only Generating first approval request

litchick10
Tera Guru

I am trying to add approvals to the Decision table (dmn_decision) using flow designer.  The issue arises when more than one user is an approver.  (I have a field that generates a string of user sys ids)

When I convert the string to an array then try to populate the array results into approvals, only the first approver is created, the flow designer shows the system is waiting:

find_real_file.png <-- field values

find_real_file.png

find_real_file.png

How do I populate a list of users into an approval to have approvals generate for each user? 

 

 

4 REPLIES 4

Kristy Merriam
Administrator
Administrator

Does just one person need to approve or should everyone have to approve?

I've had this same requirement before and used a Subflow to create the approvals for each user. The Subflow was simple with 2 inputs.. the user and the record:

find_real_file.png

I then used the Subflow in the loop in my main flow to assign the approvals to each user without the flow stopping to wait for the previous approval. 

I ended up doing something similar but it still is irritating that the field won't generate both in a single go. 

Have a look at this article:

https://community.servicenow.com/community?id=community_question&sys_id=8242f2661b245010fff162c4bd4b...

This will allow you to script the approval rules so you may be able to pass your string array to the approval rule.

KirilD
Tera Contributor

You need to do the following:

1) Create action script, which converts the answers from the decision table into string of sysIDs (comma separated).

2) As the Ask for approval rule field accepts only pills, you need to create a flow variable of type Reference and assign the output of the script to it

3) assign the flow var to the Ask for approval rule (Anyone approves)

That's it