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.
Solved! Go to Solution.
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:Note: 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:
@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:
The flow works successfully as below:
Best regards,
Kris
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:Note: 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:
@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:
The flow works successfully as below:
Best regards,
Kris
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.
Don't know if all these steps are needed but it works for me.
Hope this helps!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
7 | |
2 | |
2 | |
2 | |
1 |