cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
g33kphr33k
Level: Powered On

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
Super User

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
g33kphr33k
Level: Powered On

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?

 

Community Support Team
Community Support Team

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.

g33kphr33k
Level: Powered On

[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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,427)