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 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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

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

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,885)