Have changes been made to a column?

Get the changes made to SharePoint Items with Power Automate

Recently the Get changes for an item or file action was added to SharePoint. Here a full overview

Get changes for an item or file action

The Get Changes for an item or file action will require your list or library to have versioning enabled. If you don’t have versioning enabled you will see the following error message:

Versioning not enabled for list

Get the changes made to SharePoint Items with Power Automate 1

You can enable Versioning in the list or library settings

Get the changes made to SharePoint Items with Power Automate 2

Nothing complicated here. Be aware however that the versioning settings will affect the functionality in your flow. So for example the number of versions kept will be important for your flow.

Once enabled the action will now work and return data.

Get the changes made to SharePoint Items with Power Automate 3

At the end of the long list of true/false values there is a short overview in json, which is a bit easier to use. Here we can see that I updated the column with the name Choice

Get the changes made to SharePoint Items with Power Automate 4

So now we know the fields that have changed but we don’t really know what they changed to or from.

Versions of items or documents

When you look through the dynamic properties, you will very quickly bump into the Since Version Number and until Version number

Get the changes made to SharePoint Items with Power Automate 5

These give you the range of version numbers that the flow has checked.

Now if only we could get to the data of a version number of data in SharePoint!

Well we can. but it might not be as easy has you hoped for

You will need to build up the following configuration for the Send an HTTP request to SharePoint action.

I’m now going to use the SinceVersionId to query the versions of the list item that was changed and that triggered my flow.

I can do that with the following expression. Note that this is SinceVersionId and not SinceVersionLabel.

outputs('Get_changes_for_an_item_or_a_file_(properties_only)')?['body/SinceVersionId']
Get the changes made to SharePoint Items with Power Automate 6

How to get the previous values?

We now need to have another look at the Get changes for an item or a file action

Get changes for an item or a file (properties only)

If we now configure the Until field to get its date from the Modified date of the trigger minus one second. Then we know that we have the previous version of the item and the job is done!

3 thoughts on “Get the changes made to SharePoint Items with Power Automate

  1. If you only want to check against the previous version you can use the expression “sub(int(triggerOutputs()?[‘body/{VersionNumber}’]),1)” in the Since column.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: