I'm building an approval flow and running into a logic issue.
Our Azure AD is complete with each person's manager. For this particular flow, there will be 3 levels of heirarchy. Mgr, Div Mgr and Div Exec. Both Mgr and Div Mgr will be submitting the items to trigger the flow.
Scenario #1 -- Mgr submits item, it triggers the flow and the approval is sent to his Div Mgr. If approved, the approval goes to the Div Mgr's Manager (Div Exec). Pretty straightforward approval flow and no problems with this scenario. I'm using the Get Manager action for the Mgr and the Div Mgr. Mgr --> Div Mgr --> Div Exec At each approval level, the flow updates the SharePoint list with a different status so that the user knows where the approval is in the process and a custom email goes out to the user based on the level of approval.
Scenario #2 -- If the Div Mgr submits the item, it triggers the flow and approval is sent to his Div Exec. If the Div Exec approves, there is no one above him in the heirarchy so I need the flow to stop after this step. Div Mgr --> Div Exec
My question is if the Mgr is submitting, I want the flow to go through the two levels of approval, however, if the Div Mgr is submitting I only want the flow to go through one level of approval. Because there are two approval levels set in the flow, when the Div Mgr submits to the Div Exec and it's approved at that level, the flow is expecting one more approval level.
Hi @blalor1,
Could you please share a bit more about your SharePoint list?
I suppose that there is Person or Group column in your SharePoint list to store these three users. The data structure of my SharePoint list as below:
RequestContent Single line of text
Applicant Person or Group
ApprovalStatus Single line of text
On my side, the 3 levels of hierarchy as below:
Test5--> Test3--> Test1
I have made a test on my side, please take a try with the following workaround:
Add a “Condition 3”, left input box set to Response content of “Start an approval” action, right input box set to Approve, within middle drop down, choose is equal to.
Within “If/yes” branch of “Condition 3”, add “Update item” action, then add “Send an email” action. After that, add “Get manager (V1) 2” action, User (UPN) set to User Principle Name content of “Get manager (V1)” action. Then add “Start an approval 2” action, Assigned to field set to Email content of “Get manager (V1) 2” action. Add a Condition 2, left input box set to Response content of “Start an approval 2” action, right input box set to Approve, within middle drop down, choose is equal to. Within “If/yes” branch of Condition 2, add “Update item 2” and “Send an email 2” action.
Within “If/yes” branch of “Condition 4”, add “Start an approval 3”, Assigned to field set to Email content of “Get manager (V1)” action. Add a “Condition 5”, left input box set to Response content of “Start an approval 3” action, right input box set to Approve, within middle drop down, choose is equal to.
Within “If/yes” branch of “Condition 5”, add “Update item 3” and “Send an email 3” action.
Image reference:
Image of "Condition":
Image of "Condition 3":
Image of "Condition 2":
Image of "Condition 4":
Image of "Condition 5":
The flow works successfully as below:
Best regards,
Kris
Hi Kris... thank you for the reply. Actually, these users are not stored in a SP list, but rather pulled from the Get Manager function in Flow. However, I did solve this by utilizing a work around. I changed the job title of our executives to "Executive" and then set up conditions based on if the job title = "Executive".
Thanks, Bill
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
69 | |
27 | |
22 | |
15 | |
13 |
User | Count |
---|---|
132 | |
43 | |
42 | |
34 | |
31 |