I am trying to setup a new flow to set SharePoint Content Approval status, that is triggered by a file creation or the modification of the file that is in a Document Library with major versioning enabled. So far the flow is going like this: 1. Document is created or modified 2. Document moves to Pending status 3. Flow starts the Approval 4. User chooses to approve 5. Document status is changed to Approved (This is the point where I want everything to stop, but it doesn't.) 6. Now the Approval Flow is initiated again (I assume this is happening as a result of the document status change from Pending to Approved.)
The main problem I have is this leaves a new approval flow opened for documents in "Approved" status.
I am attaching a screenshot of my flow for reference.
Hi @ bvol,
This issue is confirmed on my side.
We could add a “Condition” before “Start an approval”, only when the file‘s status is Pending, You could “Start an approval”, otherwise,if the file’s status is not Pending, do nothing.
We couldn’t use the system automatically generate field “Approval Status” in the “Condition”, so we could add a field in the list to record the file’s Approval Status.
I have made a test on my side, you could add a “file status” column in the Sharepoint library as screenshots below:
The “file status” column is a choice type column, the column‘s value could be “Approved” , “Rejected” or “Pending” ,the column‘s default value is Pending.
You could create a flow following steps below:
Image reference:
When a file is created in the library, the flow run successfully as below:
The screenshot of the new created file’s status in the Sharepoint library as below:
Note: The flow would work when a file is created in the library, I am afraid it is difficult for the flow to “Start an approve” with updated file in this situation, because the “Approval Status” and “file Status” of a file in the library would always be “Approved” or “Rejected”, you could not “Start an approve” with the file again.
Regards,
Alice Zhang
@v-yuazh-msftwrote:Note: The flow would work when a file is created in the library, I am afraid it is difficult for the flow to “Start an approve” with updated file in this situation, because the “Approval Status” and “file Status” of a file in the library would always be “Approved” or “Rejected”, you could not “Start an approve” with the file again.
Regards,
Alice Zhang
Thanks for documenting this out, Alice. It was extremely helpful as I kept getting errors because I didn't have a value in the eTag part of the "Set Content Approval Status" step. I needed to add the step to get the file metadata with the "Identifier" dynamic data, which then gave me the "eTag" dynamic data as an available choice in the Set Content Approval Status step.
One difference in my design allows for this to work for any version of the file, not just on the new document creation. I am using a Yes/No column to trigger the approval that's called For Review. The default value is No and the author/editor just has to change this to Yes to start the approval process. My update item step - right after starting the condition for if the approval response equals approve is setting this For Review column value back to No for both branches. I would add screenshots but I don't see an option to do that, but it's just replacing the choice column you have File Status with the Yes/No column For Review. Any time this is set to yes the approval proceeds and will set it back to No with either outcome of the approval since it is no longer "for review."
Thanks for this guys. It helped me out creating our flow, we had the exact requirements of the OP.
Do you know what is really needed is the option to set an action to NOT trigger another flow e.g. Tick box "Allow action to trigger another flow".
User | Count |
---|---|
61 | |
52 | |
48 | |
28 | |
18 |
User | Count |
---|---|
27 | |
26 | |
26 | |
22 | |
21 |