cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Mutli Level Approval with Loop Until Required Fields Filled

Hi,

I have set up a multi approval flow, where the 2nd level of approval requires additional required fields to be filled. What I want to do is add some sort of a loop so that if the required fields are not filled it loops back and doesn't continue to the next approval level. Or even better approval is not available until all the required fields are met.

What's the best way to achieve this?
7 REPLIES 7
Highlighted
Dual Super User
Dual Super User

Re: Mutli Level Approval with Loop Until Required Fields Filled

Add a loop after the first approval completes.  In that loop put a Get Item action and a pause.  After the Get Item check to make sure the required fields are filled.  If not pause for a period of time and then loop and check again.  Exit the loop after the required fields are completed.  After exiting the loop do the next approval.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Community Support
Community Support

Re: Mutli Level Approval with Loop Until Required Fields Filled

Hi @pedanticpad ,

 

Please take a try with @Pstork1 's suggestion and let me know if your problem could be solved.

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Highlighted
Frequent Visitor

Re: Mutli Level Approval with Loop Until Required Fields Filled

image.pngHi,

 

Pause = Do Until?

 

I have 15 required fields, do I need to add a separate Do Until for each field?  Where in the loop is best to send a reminder email that there are blank required fields?

 

 
Highlighted
Dual Super User
Dual Super User

Re: Mutli Level Approval with Loop Until Required Fields Filled

The Get item (not Get Items) needs to be inside the Loop.  if its outside the Loop you'll never see the change in the value even if it happens.  If you want to require 15 fields then you will need to have 15 conditions, but you won't need 15 loops.  You can put all the checks inside each loop.  I would suggest 15 parallel conditions that set 15 variables to 1 or 0 based on whether the value was set or not.  Then add the 15 variables together and exit the loop if the value is 15.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Frequent Visitor

Re: Mutli Level Approval with Loop Until Required Fields Filled

Thanks for the advice,  any chance you could dumb that down?  I'm not 100% following.

 

Do I need 15 parallel "Do Until" conditions?  How do I set them to be 1 or 0?  How do I check for a sum of 15 to exit loop?

Highlighted
Dual Super User
Dual Super User

Re: Mutli Level Approval with Loop Until Required Fields Filled

Sorry, let me clarify.

 

  • One Do Until based on a variable total reaching 15. Set the variable to 0 at the top of the loop.  Then do a Get Item to get the item you need to check for required fields.
  • 15 parallel branches inside the do until.  Each branch checks to see if one of the fields is completed on the item you got.  If it is add one to the variable you set to 0.  This is your running tally of completed entries.
  • AFter exiting the parallel branches check to see if the variable is 15.  If it is exit the loop.  If not set a delay.
  • Loop around and do it again.


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Highlighted
Frequent Visitor

Re: Mutli Level Approval with Loop Until Required Fields Filled

Sorry, I'm fairly new to flow and I just can't follow this.  Can you do a screenshot of an example flow?

Helpful resources

Announcements
firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Users online (6,237)