web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to find Final or l...
Power Automate
Unanswered

How to find Final or last approver if I have x no of approvers

(1) ShareShare
ReportReport
Posted on by 166
 
last(outputs('Start and wait for an approval 2')?['body/responses'])['approver']  - Only give me previous approver NOT the Final approver
 
Basically I have to update the status of the ticket/issue once the last approver approves the flow.
 
For now i am capturing the responses and capturing the outcome of the flow (Approve / reject)
 
 
But once the last approver completes the flow I want the status to be updated as Approval Completed / Approved
Categories:
I have the same question (0)
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
    Hi,
     
    Try this expression 
     
    first(reverse(sort(outputs('Start_and_wait_for_an_approval')?['body/responses'],'responseDate')))?['responder/
    displayName']
     
    It sorts the approvers details by the time by which they have responded to request and taking the first approver details as output
     

    Thanks & Regards,
    Nived N 
    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs
     Found my answer helpful? Please consider marking it as the solution!
     Your appreciation keeps me motivated. Thank you!

     
     
     
  • PraveenC Profile Picture
    166 on at
    Thank you for responding Nived.
     
    But how do I know he is the last approver and there arent any more after him?
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
    Hi,
     
    One thing to note in the expression which i have provided is, if you see expression is sorting the approval action's results based on responseDate property, it will get sorted in ascending order in default. While we need to get latest approver's time, so we need to reverse the sorting done and need to pick up the first approver details from the result which would be last approver who has approved the request.
     
    Hope this clarifies.
     
     
     

    Thanks & Regards,
    Nived N 
    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs
     Found my answer helpful? Please consider marking it as the solution!
     Your appreciation keeps me motivated. Thank you!
     
     
  • Verified answer
    PraveenC Profile Picture
    166 on at
    I have created 2 variables.
    1) To increment for each loop
    2) Got the approval order, which was sequential number.
     
    After the loop I checked if these to counters are same, then update Status
  • Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
    Hi @PraveenC,
     
    did not understand by the below reply - is it the solution which has been worked out ?
     
     
  • PraveenC Profile Picture
    166 on at
    Hello Nived,
     
    Yes I used 2 variables to fix the issue
     
    In the approval list, there was a field called approval order 0,1,2,3 etc. So i got max of that value
     
    I used a counter as each approval happened.
     
    Out of the loop I compared these two variables. if there are same then I assumed it was last approval completed and updated the status

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard