Skip to main content

Notifications

Community site session details

Community site session details

Session Id : Mje36JaoljH+c5d1kuePKd
Power Automate - General Discussion
Answered

Store Multiple Comments in an Everyone Must Approve Flow

Like (0) ShareShare
ReportReport
Posted on 21 Jun 2022 14:15:16 by 46

Hi guys, I'm fairly new to PA and I've run into a bit of a problem when it comes to storing multiple comments from 3 different approvers in my flow, I'm hoping someone can provide a solution or workaround for this.

 

Scenario: Basically, the flow I have is 3 x "Start & wait for Approval (Everyone Must Approve)", this also allows an approver to add a comment with their response and 3 x "Do Until" loops to send out a reminder if a Approver has not yet approved of the submitted request and there's also a few conditions in-between all of this.

 

A brief rundown of the process is as follows, a request is submitted for an order, this will create a new item in my SharePoint list, Approver1 will receive an email asking them to approver the request, if they approve it then Approver2 will receive an email asking them to approve the request and then Approver3 will be asked the same, in that hierarchy manner. At any time if one of the  Approvers approve or reject the request, then the SP list will update the "Approve or Reject" status, and add the Approver "Name & Comment" in one column and the flow would have successfully executed.

 

Objective: When Approver1 approves or rejects a request I want to capture their "NAME & COMMENT", then I want to do this again for Approver2 and Approver3. 

 

I tried the "Initialize Variable" and "Append to String Variable" method as shown in the screenshots provided, however this automatically creates multiple "Apply to Each" loops which I don't want as it could be problematic later when I actually want to use "Apply to Each" loops in my flow, also I believe there's a limited amount you can use in a flow apparently? I'm not too sure...

 

1st Approver Name & Comment:

Electr0Nucleu5_0-1655819841018.png

 

2nd Approver Name & Comment:

Electr0Nucleu5_1-1655820429004.png

 

 

Feedback on how to resolve this would be appreciated. Apologies for the long read

  • Verified answer
    Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on 27 Jun 2022 at 06:59:35
    Re: Store Multiple Comments in an Everyone Must Approve Flow

    @Electr0Nucleu5  So in first approval action- everyone must approve and rest 2 are having one approver.

    In that case logic is still the same. Initialize variable then append to string ( either comment or approver name) and then use this variable anywhere in your logic.

    Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

     

  • Electr0Nucleu5 Profile Picture
    46 on 27 Jun 2022 at 06:55:45
    Re: Store Multiple Comments in an Everyone Must Approve Flow

    Hi @Hardesh15 there's only one approver for each approver action. It's only the 1st approval action that has 2 x approvers, the rest of the approval actions have 1 x approver

  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on 27 Jun 2022 at 06:45:21
    Re: Store Multiple Comments in an Everyone Must Approve Flow

    @Electr0Nucleu5  and how many approvers in one approval action?

     

    Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

  • Electr0Nucleu5 Profile Picture
    46 on 27 Jun 2022 at 06:14:04
    Re: Store Multiple Comments in an Everyone Must Approve Flow

    @Hardesh15 I am using a "Start and wait for Approval" - everyone must approve..

    Electr0Nucleu5_0-1656310411078.png

     

     

  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on 27 Jun 2022 at 05:54:13
    Re: Store Multiple Comments in an Everyone Must Approve Flow

    @Electr0Nucleu5  this is because you are using approval action- first to response am i right? consider someone uses 3 approvers and want anyone approves it that is the reason it is applying loop. if you have one approver then why fear about loop. is it causing any issue?

    In apply to each 2, use append to string variable and then pass value. After that you can use that variable value in compose.

    Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

  • Electr0Nucleu5 Profile Picture
    46 on 27 Jun 2022 at 05:39:40
    Re: Store Multiple Comments in an Everyone Must Approve Flow

    Hi, @Hardesh15 I have currently tried using a (Compose) to store my approverOneName in it so that I can later add it next to my (approverOneComment) when i update my list then it will display the ApproverName and their Comment. However this Compose method aso creates multiple "Apply to Each". I then tried the "Initialize Variable" and "Set Variable", this also creates multiple "Apply to Each" loops. I have attached them below..

     

    Compose:

    Electr0Nucleu5_0-1656308233597.png

     

    Initialize Variable:

    Electr0Nucleu5_1-1656308358064.png

     

     

  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on 24 Jun 2022 at 08:55:03
    Re: Store Multiple Comments in an Everyone Must Approve Flow

    @Electr0Nucleu5  Store each approval name in compose( create 3 compose for each approvers). If compose is inside apply to each its scope will be limited to loop. In that case use variables.

    Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

     

  • Electr0Nucleu5 Profile Picture
    46 on 24 Jun 2022 at 06:01:30
    Re: Store Multiple Comments in an Everyone Must Approve Flow

    Hi @Hardesh15 , thanks that at least provided me with some direction into the use of 3 x variables and also that compose function which I used to store the value in and call it later when I update my list. That worked 100%.

     

    There is however one more thing, I currently also want to store my "approverName" with the "approverComment" next to it, in one line in my Sharepoint list. Do you know how I can accomplish this correctly?

     

    As you can see, in the screenshot below, Power Automate automatically generates an (Apply to Each) again. This happens as soon as I add my "ResponsesApproverName" next to the "Outputs" in my (1stApprover/Comments) row and in the (2ndApproverComments).

     

    Is there a way to join the two or somehow insert them side by side while avoiding the additional Apply to Each loop. Please provide some clarity if possible?

     

    Electr0Nucleu5_0-1656050119081.png

     

  • Electr0Nucleu5 Profile Picture
    46 on 22 Jun 2022 at 10:05:31
    Re: Store Multiple Comments in an Everyone Must Approve Flow

    Hi @Hardesh15 would it be possible for you to provide a screenshot perhaps?

  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on 21 Jun 2022 at 16:59:45
    Re: Store Multiple Comments in an Everyone Must Approve Flow

    @Electr0Nucleu5 Why are you using same variable for each approver comment?. Use separate variable for each approver. Later you can use one compose in which all variables can be used as input which will have your complete comments from all approvers.

    Please 'Thumbs Up' the posts that helped you and 'Accept as Solution' if my post answered your question.

    @Hardesh /Gopenly.in

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,668 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,004 Most Valuable Professional

Leaderboard