Hi everyone,
I'm struggling with specific logic in building an approval flow in Power Automate:
Requirement
We have a SharePoint list in which end-users are meant to make modifications, though an approval flow is required to approve any list modification.
Problem in Power Automate
I have built up the approval workflow, works fine when the list modification is approved. The logic I am struggling with is the following (trying to explain step-by-step below):
1) As soon as a modification is made in the SharePoint list (despite it having an approval flow in Power Automate), the modification is made effective on the list. This is fine if the value change is ultimately approved, not so when rejected. If the requested modification is rejected, the value on the list should be reverted back to the pre-approval value.
2) Therefore we have a secondary (hidden) SharePoint list holding the 'master' version of the SharePoint list, which is only to be updated when a list modification is approved
3) If the approval is ultimately rejected, I am trying to apply the following logic:
- Get all values from a secondary SharePoint list (holding same list data, including all approved list changes)
- Match the item that was under approval from the primary SharePoint to the secondary SharePoint list
- Revert the item for which the approval was rejected back to its original value(s) (as the requested modification is rejected, thus the value changes made should be reverted, and no longer effective)
My question
Am I missing something here, or would I need to work with a secondary SharePoint list to make the above logic work? Hoping there is an easier way to get this working. Would greatly appreciate your input on this!
Good day Community, I am trying to do exactly this.
When a sharepoint list is modified, an approval flow is triggered. If approved the modifications to the list gets saved, if rejected the modifications are ignored.
Is there an easier way to do this now?
Hi,
Thank you for your help on this one. I'm trying to figure out which input (in the Compose action) to put in below:
Would this be the list item field I can pick up out of the "Parse VersionHistory JSON" block, or somewhere else? The linked article does not describe the correct input to go for in this instance.
Thank you!
Hi again
Can you share a screenshot from your current flow design? Sorry it's probably me, but from your text description I cannot figure out what is your new challenge
Thanx!
Hi @efialttes
Thank you for the great help! I'm trying this in my flow (so far so good), but was wondering on the final step that is taken in the article you linked to. In the screenshot shown in the article, there is a final Compose action used to pick up the old value you would like to use later on in the flow (in this example the old office location):
As the screenshot only shows the run results, I wanted to be sure about what to select here in building the flow. Would this be the list value (in this example office location) that can be picked up from the Parse VersionHistory JSON block?
Thank you in advance for your continued help!!
Hi @Anonymous ,
The only solution should be as @efialttes has provided.
Best regards,
Alice
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi!
You can activate 'Version history' on your Sharepoint list, and use 'Send HTTP request to Sharepoint' action block to get previous value if needed. It's a bit tricky, but works like a charm.
Good stuff here
https://www.catapultsystems.com/blogs/get-previous-versions-of-sharepoint-list-items-in-flow/
Hope this helps
WarrenBelz
146,776
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,093
Most Valuable Professional