How to add users in a list collector as approvers in a flow

Tamilvanan T
Tera Contributor

Hi,

I have a list field in a table which stores the list of Users (references user table). I'm looking for a way to add the user  in this list field as approvals for an RITM in the flow designer. I've looked at some community pages where the suggested solution was to look up records and ask for approval in a loop and some articles are archieved. This did not work for me as the ask for approval action is accepting only reference fields and look up record is returning record type. Any help here is greatly appreciated.

5 REPLIES 5

Medi C
Giga Sage

Hi @Tamilvanan T,

 

I hope you are doing well. You can do this by providing a script on your "Ask for Approval" Flow Action. I have just done the same on a Catalog Item. Here is the implementation and please adjust as per your requirements.

 

First I get all the variables from the requested item (That include my list collector for the users I want to request the approval from)

MediC_0-1741724515407.png

 

Scripted Ask for Approval Flow Action. You may adjust the first line of code so that it is gathering the sys_ids of the users (comma separated or array)

MediC_1-1741724540341.png

 

Script used:

var approvers = fd_data._1__get_catalog_variables.approvers;
return "ApprovesRejectsAnyU["+approvers+"]"

 

Results:

MediC_2-1741724578095.png

MediC_3-1741724747993.png

 


If you found this helpful, please hit the thumbs-up button and mark as correct. That helps others find their solutions.