For each loop to check group approval in flow designer

MS17
Tera Contributor

Hi All,

 

I have a requirement to review the group annually, if group has no manager or manager is inactive, we need to trigger approval to "admin" group, if anyone from this group is rejected, then deactivate that group, if approved keep it active, if no action taken, then wait for 5 days and trigger reminder notification, still no response, then the group should be deactivated.

 

I created a scheduled flow to trigger every year,  I created group approval record for each group which has no manager or manager is inactive, now i need to check if anyone from the group is approved/rejected for each group approval record, can anyone help me                        

 
 
 
 

1.png2.png

1 ACCEPTED SOLUTION

Hello @MS17 ,

Create a new flow variable

Subflow add 01.png

 

Add Do the Following in Parallel as 3rd step, then followed by Ask For approval and then if Statements. Inside If, set the flow variables...

Subflow add 02.png

and then set the value of same flow variable in case approved within due date

Subflow add .png

 Then in parallel Branch, add wait for duration and then IF action followed by Fire Event as per your case.

Subflow add 03.png

Hope this helps!

View solution in original post

16 REPLIES 16

MS17
Tera Contributor

Hi @AlfrinAJ ,

I tried the solution you provided which is triggering group approval parallelly,

now - if group member rejected, the group should be deactivated,

         - if no response, after 5 days we need to trigger notification for admin team, 

        - then if group is rejected, deactivate -> group, if no response deactivate group

I tried this, but it is not working as expected, i have given duration 10 sec for testingappr.pngappr1.pngappr2.png

Hello @MS17 ,

 

You don't have to put wait for duration, instead you can use the due date option in Ask For Approval action. So the subflow will wait till that time for approval. If not approved, then it will go to next steps marking the Approval as No Longer Required.

 

Subflow Due Date.png

After Step 3, add if action followed by update the group record.

 

Subflow if else.png

MS17
Tera Contributor

Hi @AlfrinAJ,

I given due date in ask for approval, but the logic is

- once approval created, after 5 days need to send reminder notification, if not approved/rejected

- then after reminder, wait for 5 days, then if rejected/ignored -> deactivate, due date for the approval is 10 days.

 

app.pngapp1.png

Hello @MS17 ,

Create a new flow variable

Subflow add 01.png

 

Add Do the Following in Parallel as 3rd step, then followed by Ask For approval and then if Statements. Inside If, set the flow variables...

Subflow add 02.png

and then set the value of same flow variable in case approved within due date

Subflow add .png

 Then in parallel Branch, add wait for duration and then IF action followed by Fire Event as per your case.

Subflow add 03.png

Hope this helps!

MS17
Tera Contributor

Hi @AlfrinAJ ,

thanks, it is working!

I have a scenario, if group has manager, then i need to trigger approval to manager, 

-> if they rejected deactivate the group

-> if not approved/rejected in 5 days, then trigger notification to manager

-> then after 5 days if not approved/rejected then deactivate the group

same logic implemented for group approval, i tried the steps as below, but else part is not running, what mistake i made here.

 

i created new flow variable appr state, and used in set flow variables

0d3fc4e3-0fc3-4def-bb55-c030c40873e3.png

mgr appr 1.png

mgr appr2.png

 

I used create record to create approval record