cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
karl_oliverio
Resolver I
Resolver I

How to get the individual response of approvers in action "Start and wait for an approval"

I am currently using "Start and wait for an approval" with custom responses. What dynamic content should I use to get the individual response of each approver. I think "outcome" is not the right one to use since it will output the overall outcome of the approval.

 

 

@Pstork1 I know I you answered my question recently about what to use for the overall approval. Now, I am lost on what to use to get the individual response. I assume "responses" will return "Approved" but when I used it on my approvals before having multiple approvers, it returned "Approved Approved Approved".

 

 

Collaboration route.PNG

1 ACCEPTED SOLUTION

Accepted Solutions

You could do your condition with Contains, but that would still approve if the result was "Approve Reject Approve" where one person rejects the item.  In that case there really is no option other than using a loop.



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

View solution in original post

5 REPLIES 5
RezaDorrani
Dual Super User
Dual Super User

Hi @karl_oliverio 

 

The Reponses object (array) will give you the individual responses

You can loop through the Responses dynamic content

Within the loop

 

expression - item()?['approverResponse'] - will give you the response form the apporver

expression -  item()?['responder']?['userPrincipalName'] - will give you the UPN of the person who responded

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Pstork1
Dual Super User
Dual Super User

The "Approved Approved Approved" in outcome would be because you assigned the approval to three people.



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

Hi @Pstork1 , yes i have multiple approvers that is why the flow is returning values "approve approve approve". Is there a shorter way where i can use it on my condition wherein i only indicate "approve" and not use "approve approve approve" since there are some cases that the count of my approvers will change

You could do your condition with Contains, but that would still approve if the result was "Approve Reject Approve" where one person rejects the item.  In that case there really is no option other than using a loop.



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

I was recently building a quick approval system for my org and developed a more polished way of doing this without loops & with better formatting...
Responders.png


Code to copy & control+V paste into a new action menu "My clipboard" section

{"id":"7136857a-d0e9-47f7-9b74-87697098721d","brandColor":"#8C3900","connectionReferences":{"shared_office365users":{"connection":{"id":"/providers/Microsoft.PowerApps/apis/shared_office365users/connections/88b73cab99bd4598bfce9895cb9a47b2"}},"shared_office365users_1":{"connection":{"id":"/providers/Microsoft.PowerApps/apis/shared_office365users/connections/88b73cab99bd4598bfce9895cb9a47b2"}},"shared_office365":{"connection":{"id":"/providers/Microsoft.PowerApps/apis/shared_office365/connections/shared-office365-67f10a94-c084-4840-baf8-1be9-5c063787"}},"shared_microsoftforms":{"connection":{"id":"/providers/Microsoft.PowerApps/apis/shared_microsoftforms/connections/shared-microsoftform-a6fc78b2-11a3-41b2-bf04-1ebf5cf143c6"}},"shared_sharepointonline":{"connection":{"id":"/providers/Microsoft.PowerApps/apis/shared_sharepointonline/connections/shared-sharepointonl-60d1f27e-bd8b-43f2-a8ad-a7be60200f79"}},"shared_approvals":{"connection":{"id":"/providers/Microsoft.PowerApps/apis/shared_approvals/connections/shared-approvals-39fa7c48-bf13-4c6a-a5cd-45d1-5cdc5d95"}}},"connectorDisplayName":"Control","icon":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDMyIDMyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPg0KIDxwYXRoIGQ9Im0wIDBoMzJ2MzJoLTMyeiIgZmlsbD0iIzhDMzkwMCIvPg0KIDxwYXRoIGQ9Im04IDEwaDE2djEyaC0xNnptMTUgMTF2LTEwaC0xNHYxMHptLTItOHY2aC0xMHYtNnptLTEgNXYtNGgtOHY0eiIgZmlsbD0iI2ZmZiIvPg0KPC9zdmc+DQo=","isTrigger":false,"operationName":"Get_responders_and_comments_from_Start_and_wait_for_an_approval","operationDefinition":{"type":"Scope","actions":{"SelectMoreApprovalDetails":{"type":"Select","inputs":{"from":"@outputs('Start_and_wait_for_an_approval')?['body/responses']","select":"@concat('Reviewer: ', item()?['responder']?['displayName'], decodeUriComponent('%0A'), 'Response: ', item()?['approverResponse'], decodeUriComponent('%0A'), 'Comment: ', item()?['comments'])"},"runAfter":{},"description":"Enter the Responses dynamic content from your \"Start and wait for an approval\" action in the From field","metadata":{"operationMetadataId":"fdadb5f3-98e8-40a1-9da1-360477370c9b"}},"RespondersAndComments":{"type":"Compose","inputs":"@join(body('SelectMoreApprovalDetails'), decodeUriComponent('%0A%0A'))","runAfter":{"SelectMoreApprovalDetails":["Succeeded"]}}},"runAfter":{"Start_and_wait_for_an_approval":["Succeeded"]},"description":"Will get each responder & their comments for an action named \"Start and wait for an approval\". If your action name is different, like \"Start and wait for an approval 2\" you need to update the From field of the 1st Select action."}}

 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (1,599)