Hi everyone, I have got a flow that supposed to grab the previous column's values and track its changes. I followed the guide based on this video Power Automate SharePoint Item Modified flow | Track Column Changes (Version History) - YouTube.
My Send an HTTP Request to SharePoint action output is grabbing the results correctly of modified and
Figure 1 Send_an_HTTP_request_to_SharePoint
Figure 2 Append To Array result 1
Figure 3 Append To Array result 2
Figure 4 Select - Column Names
Thanks!
Hi I have fixed the issue i have just changed the select - column names action map section to replace(item()?['ColumnName'], 'field_', 'field_x005f_'). Instead of using a second Send an HTTP request to SharePoint. This seemed to work and pick up the previous changes. This works considering the field names in the select action has to match with Send an HTTP request to Sharepoint field names to show results.
Here is my expression for the first Send an HTTP request to SharePoint:
_api/web/lists/GetByTitle('Emp List')/items(@{triggerOutputs()?['body/ID']})/versions?$filter=VersionLabel eq '@{sub(decimal(triggerOutputs()?['body/{VersionNumber}']), 1)}' &$select=@{join(body('Select_-_Column_Names'), ',')}
I did a sub expression to get the previous record.
Hi @mg1308,
Can you share a screenshot of the configuration of the Send an HTTP request to SharePoint action. Interested to see what Uri and Headers you are using in that action.
I would expect this type of URI:
_api/web/lists/getbytitle('Documents')/items(<itemid, for example 18>)/versions?$filter=VersionLabel eq '<versionlabel, for example 1.0>'&$select=@{join(body('Select_ColumnNames'),',')}
Thank you so much for your response! I was able to grab the correct name by creating another Send an HTTP request to SharePoint action named it as Send an HTTP request to SharePoint action - GetInternalName but my value part in my Append to variable is still blank, my expression is
Here is also a screenshot of my whole flow:
Hi @mg1308,
The underscore character gets encoded in the ColumnHasChanged array in the Get changes for an item or file action. So the _ in field_8 gets encoded to _x005f_ which makes it field_x005F_8
(HEX 005F, https://www.w3schools.com/charsets/ref_utf_basic_latin.asp)
In the below thread I tried to workaround that by using the internalname of the field instead:
Michael E. Gernaey
566
Super User 2025 Season 1
David_MA
516
Super User 2025 Season 1
stampcoin
492