custom approval in flow designer

Deepika54
Tera Contributor

Hello experts, 

 

I am creating a flow designer in which in the output variable, i have comma seperated user's sysid's example

 
["904aa11993c322909fa4d2fbb9373c16","24206a0f93792e105f36bb697bba102a"]
I want to send an approval to all of the users that will be there in the output of the action which will hold the sysid's.
Can anyone tell me how to pass these values in the ask for approval in flow designer
3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

@Deepika54 

you can use scripted approvals

check this link which uses flow variable to handle this

Scripted Approvals in Flow Designer with Flow Variables 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Deepika54 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Afrith Shariff
Tera Guru

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. 

image.png

 

This is the different options available for you to use in Script.

 

ApprovalScript
Approved by any UserApprovesAnyU[user_sys_id,user_sys_id]
Approved by 50% of GroupApproves50%G[group_sys_id]
Approved by 2 of Users or of GroupApproves2#U[user_sys_id,user_sys_id]G[group_sys_id]
Rejected by all UsersRejectsAllU[user_sys_id,user_sys_id]
Rejected by any user in GroupRejectsAnyG[group_sys_id,group_sys_id]
Approved or Rejected by any UserApprovesRejectsAnyU[user_sys_id]
Approved by Group or Rejected by any UserApprovesAnyG[group_sys_id]OrRejectsAnyU[user_sys_id]
All responded and anyone approves in GroupApprovesResG[group_sys_id]

 

Thanks,

Afrith

"If you feel this was helpful, Please mark this comment as helpful"