cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jlynch92009
Level: Powered On

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
jlynch92009
Level: Powered On

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?
jlynch92009
Level: Powered On

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!.

4 REPLIES 4
Super User
Super User

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
jlynch92009
Level: Powered On

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?
Super User
Super User

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
jlynch92009
Level: Powered On

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!.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 49 members 4,729 guests
Recent signins:
Please welcome our newest community members: