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

Do Until Approval by Top Level Manager

This one is complex but I have figured out that I can get the Manager from Azure AD.  What I want to happen is to have approvals that go up the chain of command so here is my process:

  1. Get Item from Department (department tells me who the top user is)
  2. set item field "Current Requester" to creator of item (1st round start)
  3. us Do Until - set variable to "isFinalApprover" at start to false, if approver = department head from 1 above set to true, do until true.
  4. Get user profile (allows me to use UPN and set manager) for this we use the current requester field from the list item.
  5. Get Manager - using 4. UPN
  6. Update Item - set current Approver to get manager UPN
  7. start approval - condition if not final approver update item (in flow this is Update Item 4). set current requester to current approver, then start over.

The current requester updates in the list item but the get manager and update item for current manager do not...reason, update item 4 is not available and it's looking at the original, so how can I change which update item the get user and get manager pull values from?

My theory is that it will take more variables in the list item to set for the variables of final approver, then rerun the flow each time it's updated until that's updated to true...any ideas on this.

So here is the problem - Update Item 4 is not available at the top

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Frequent Visitor

Re: Do Until Approval by Top Level Manager

no, the problem is that at the top of the Do Until, the value for the Get User is the same as the initial requester, i have no way to update that user because the update item 4 at the bottom is not available at the top of the loop. I just had another idea to use a variable for the email address of the requester and approver, so at the bottom of Do Until if it's not the final approver, set requester to previous approver email (variable) and then use the variable in the get user and get manager at the top...will that work?

View solution in original post

Highlighted
Frequent Visitor

Re: Do Until Approval by Top Level Manager

approvalflow1.png

Note- I used a variable to pass the value of the email address of the approver and it worked!.

View solution in original post

4 REPLIES 4
Highlighted
Super User III
Super User III

Re: Do Until Approval by Top Level Manager

@jlynch92009:

 

So, are you saying that the problem is that when you use Get Manager that it comes back null for the top guy?

 

If so, you might try using the coalesce expression/function to check for null values and provide a default.  So, you could have a condition that checks for the null value and takes action as appropriate.

 

If you need an example, please let me know.

 

Scott

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

Scott
Highlighted
Frequent Visitor

Re: Do Until Approval by Top Level Manager

no, the problem is that at the top of the Do Until, the value for the Get User is the same as the initial requester, i have no way to update that user because the update item 4 at the bottom is not available at the top of the loop. I just had another idea to use a variable for the email address of the requester and approver, so at the bottom of Do Until if it's not the final approver, set requester to previous approver email (variable) and then use the variable in the get user and get manager at the top...will that work?

View solution in original post

Highlighted
Super User III
Super User III

Re: Do Until Approval by Top Level Manager

@jlynch92009:

 

Can you post a screen shot of your Flow?  That will make it a bit easier to assist.

 

Scott

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

Scott
Highlighted
Frequent Visitor

Re: Do Until Approval by Top Level Manager

approvalflow1.png

Note- I used a variable to pass the value of the email address of the approver and it worked!.

View solution in original post

Helpful resources

Announcements
FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,271)