cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Super User III
Super User III

@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
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (6,397)