cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
g33kphr33k
Regular Visitor

Flow Approval - update additional field/column

Hi Folks

 

I've created an additional column in a Document Library (Versioning enabled) called Schedule.  I basically want to fill this out from the Responses Comment when you do an approval.  I used the default SharePoint Approval template and have this working perfectly fine.

 

First I tried adding in the Apply To Each loop a SharePoint Update Item to update my Schedule field with the comment.  This failed and much Googling led me to find that loops break if you add anything in the approval.  Second attempt I added a new Apply To Each loop a SharePoint Update Item to put my Responses Comments in the Schedule, this worked! The side affect being that although Flow says it completed successfully, it didn't update the approval status. Third attempt I swung the loops around and set Responses Comments to the Schedule field (worked!) but then the flow errors out saying that the ETag no longer matched.

 

I'm at my wits end.  This should be super simple.  Ideally I'd like the Schedule form box to appear on the request email for approval but I don't think MS is near that yet and I'd settle for being able to capture the comment to Schedule.  Help?

4 REPLIES 4
ScottShearer
Super User
Super User

@g33kphr33k 

Please see my screen shots below.  In my example, there is only 1 approver or it is designed as a "first to respond" approval.

At the top of my Flow, I create a variable to hold the response.  Then I loop through the response comments and assign the comment to a variable.  Even though there is only one approver, Flow returns the comments in a collection so I have to loop througn it - even though there is only one comment.  My example is for a list, but it is the same concept for a library.

AppComments1.jpgAppComments2.jpgAppComments3.jpg

 

 

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

Scott

Thank you for this.  It's very close but for some reason I'm not getting Approval Value field appear in my Item Update:

 

2blur.png

I can add in the Comment/Schedule with varComments but without the approval update it won't work.  What else am I missing?

 

Hi @g33kphr33k,

 

If you want to update the item approval status, you should Set content approval status action, for example:

 

Annotation 2019-12-04 153144.png

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you for the hints.  Eventually I raised a support ticket directly with MS.  The correct solution is:

 

1. Update Item:  by {ID}

2. Get File MetaData:  FileIdentifier = {identifier}

3. Set Content Approval Status:  use {eTag} & {ID}, action is Submit

4. Set Content Approval Status:  use {eTag} & {ID}, action is Approve

 

I still don't understand why it needs to be done in this manner, but this works and allows me to capture the comment, set as the extra field I require and set the approval status correctly.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,043)