cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jlynch92009
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

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

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
ScottShearer
Super User III
Super User III

@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

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

@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

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
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (48,053)