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

Re: Flow Approval - update additional field/column

@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
Highlighted
Regular Visitor

Re: Flow Approval - update additional field/column

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?

 

Highlighted
Community Support
Community Support

Re: Flow Approval - update additional field/column

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.

Highlighted
Regular Visitor

[SOLVED] Re: Flow Approval - update additional field/column

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
FirstImage

Microsoft Ignite 2020

Check out the announcement of Power Platform content at Microsoft Ignite!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Users online (4,877)