Forum Discussion
Sharepoint List - Documenting Changes in Field Values
- 4 years ago
Csalinas144 I know what REST URL you can use, that would give you the URL for each previous versions of the same file but I got stuck
To elaborate, if your sharepoint details are following
site_url = xyz.com/teams/Analytics Folder Name = /teams/Analytics/Shared%20Documents/DataMaster file_name =test.xlsxYou can start with a REST URL like following and wrap that in Xml.Tables(Web.Contents())
https://xyz.sharepoint.com/teams/Analytics/_api/web/GetFolderByServerRelativeUrl('/teams/Analytics/Shared%20Documents/DataMaster')/Files('test.xlsx')/versions?select=Urllet Source = Xml.Tables(Web.Contents("https://xyz.sharepoint.com/teams/Analytics/_api/web/GetFolderByServerRelativeUrl('/teams/Analytics/Shared%20Documents/DataMaster')/Files('test.xlsx')/versions?select=Url")), entry = Source{0}[entry], #"Added Custom" = Table.AddColumn(entry, "Custom", each let x =[content], y = x{0}[#"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"]{0}[properties]{0}[#"http://schemas.microsoft.com/ado/2007/08/dataservices"]{0}[Url] in "https://xyz.sharepoint.com/teams/Analytics"&y) in #"Added Custom"It will bring you here
Invoking Web.Contents on each of these URL does not return the excel and returns an error [Error Text -Specified value has invalid CRLF characters] while the same URL in browser returns that corresponding version of excel
There is a previous question on this https://community.powerbi.com/t5/Desktop/Importing-previous-versions-of-Sharepoint-Files-into-PowerB...
and maybe omeallynile can shed some light on how to resolve that.
The only reliable way is to archive off old versions and track those timestamps on the file. The tracking is simple, but keeping archived versions of Excel, not so much. That would be a bit of a pain.
- Csalinas1444 years agoHelper II
Hmmm. I am willing to learn new things to make it happen.
I am currently messing with a Flow through power automate. I am just not sure where to start. And where I am going on this one.
Could you help me out? edhans- edhans4 years agoCommunity Champion
No, I am not a Power Automate expert. mahoneypat is. He could chime in, or you could go to the Power Automate forum and check there.
- mahoneypat4 years agoMicrosoft Employee
Not an expert but know enough to think this is not a road you want to go down. First, if these are xls files, you wouldn't be able to easily pull the data out of each file (easiest if it is formatted as a table in an xlsx file). If you could do that, you likely wouldn't be able to store just the changes, so you'd be storing each file over again when it is modified (the thing that would trigger your flow).
If possible, I would consider an alternate data source (Dataverse, database, SharePoint list, etc.).
Pat