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

Sharepoint List Field update - approval status

Hi, 

 

Trying to create a very standard approval with resubmission. But I have been cracking my head. 

 

The flows does 2 things, 1) sends emails and 2) update status in sharepoint list.

 

Sharepoint List Field, "Status" has 3 states, a) Pending, b) Accept and c) Reject

 

Was able to get the flow in green arrows easily using the standard approval flow template and standard connectors. 

 

My problem: Cant get flow in red to work correctly. After Step 3.1/3.2, the flow in Step 1 automatically re-fires even before the requestor edits the request. Is there any condition that I can use to ensure Step1 re-fires ONLY after Step 4 (Requestor edit s flow)? Very new to flow and appreciate any help. 

 

2018-01-29 10_29_17-Start.jpg

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @vincentakatoh,

 

Do you create a SharePoint workflow or a Microsoft Flow on your side?

Could you please share a screesnhot of your flow's configuration if you create a Microsoft Flow on your side?

Further, could you please show a bit more about the "Status" column in your SharePoint list?

 

I have create a SharePoint list on my side and the data structure of it as below:6.JPGNote: The TaskName column is a Single line of text type column, the Executor column is a Single line of text type column and the Status column is Choice type column. The Status column has three available values (Pending, Accept and Reject) and the default value of it is Pending. The Modified Request column is a Yes/No type column and the default value of it is No, when you edit your request and resubmit again, you should change the value of it into Yes.

 

I have made a test on my side and please take a try with the following workaround:

  • Add a "When an item is created or modified" trigger.
  • Add a Condition, click "Edit in advanced mode", type the following formula:
  • @or(equals(triggerBody()?['Status']?['Value'], 'Pending'),equals(triggerBody()?['Modified_x0020_Request'], true))
    Within "If/yes" branch of Condition, add a "Start an approval" action. Then add a Condition 2 action, left input box set to Response dynamic content of "Start an approval" action, right input box set to Approve, within middle drop down, choose is equal to.

         Within "If/yes" branch of Condition 2, add a "Update item" action, Status value field set to Accept. Add a "Send an email" action to send Accept notification email to Requestor.

         Within "If/no" branch of Condition 2, add a "Update item" action, Status value field set to Reject. Add a "Send an email" action to send edit request email to Requestor.

 

Image reference:7.JPG

 

8.JPG

The flow works successfully as below:9.JPG

 

 

Best regards,

Kris

 

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

View solution in original post

2 REPLIES 2
v-xida-msft
Community Support
Community Support

Hi @vincentakatoh,

 

Do you create a SharePoint workflow or a Microsoft Flow on your side?

Could you please share a screesnhot of your flow's configuration if you create a Microsoft Flow on your side?

Further, could you please show a bit more about the "Status" column in your SharePoint list?

 

I have create a SharePoint list on my side and the data structure of it as below:6.JPGNote: The TaskName column is a Single line of text type column, the Executor column is a Single line of text type column and the Status column is Choice type column. The Status column has three available values (Pending, Accept and Reject) and the default value of it is Pending. The Modified Request column is a Yes/No type column and the default value of it is No, when you edit your request and resubmit again, you should change the value of it into Yes.

 

I have made a test on my side and please take a try with the following workaround:

  • Add a "When an item is created or modified" trigger.
  • Add a Condition, click "Edit in advanced mode", type the following formula:
  • @or(equals(triggerBody()?['Status']?['Value'], 'Pending'),equals(triggerBody()?['Modified_x0020_Request'], true))
    Within "If/yes" branch of Condition, add a "Start an approval" action. Then add a Condition 2 action, left input box set to Response dynamic content of "Start an approval" action, right input box set to Approve, within middle drop down, choose is equal to.

         Within "If/yes" branch of Condition 2, add a "Update item" action, Status value field set to Accept. Add a "Send an email" action to send Accept notification email to Requestor.

         Within "If/no" branch of Condition 2, add a "Update item" action, Status value field set to Reject. Add a "Send an email" action to send edit request email to Requestor.

 

Image reference:7.JPG

 

8.JPG

The flow works successfully as below:9.JPG

 

 

Best regards,

Kris

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Lexnnn
Helper II
Helper II

I have an approval list for creation of new O365 groups.

I wanted to approve the list items directly from the email using flow.

I tried out myself but for some reason it did not work but using the method described below, I was able to do it. Thank you to the author!

Found this solution: https://www.techmikael.com/2018/05/use-microsoft-flow-to-implement.html#comment-form

I tried it out, I also works for me for approval of Sharepoint list items. Really helpful since microsoft has not implemented list items in "set content approval status".

 

Note: this solution is for Lists where Approval is enabled and the field is not a manually created field but maintained by the system so you can not use it in Flow.

Note: the approval process can take some time, for test purpose, wait multiple hours, first time took time for some reason, now it works fine.

Note: In "set content approval status", in Library name use List name but not the one from the URL

eg. https://...sites/teamsites/team-orders and the list name is Team orders, use Team orders as library name and not team-orders.

 

I though of using PATCH function to update the "approval status" field instead of "Set content approval status" but I lack the developers knowledge to write the command.flow1.PNGflow2.PNGflow3.PNGflow4.PNGflow5.PNGflow6.PNGflow7.PNGflow8.PNG

 

Don't know if all these steps are needed but it works for me.

Hope this helps!

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.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

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.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Kudoed Authors
Users online (930)