Forum Discussion
Scheduled Refresh - Dynamic Data Source Microsoft Lists
- Anonymous4 years ago
Hi elaine1217 ,
You need to fix the SharePoint site link and then you will be able to refresh it successfully.
let Source = ( VersionsRelevantSharePointListName as text, VersionsRelevantItemID as number) => let Source = Xml.Tables(Web.Contents("https://xxxxx.sharepoint.com/sites/winniz-test", [RelativePath= Text.Combine({"/_api/web/Lists/getbytitle('", VersionsRelevantSharePointListName , "')/items(", Text.From(VersionsRelevantItemID), ")/versions"})]) ), entry = Source{0}[entry], #"Removed Other Columns2" = Table.SelectColumns(entry,{"content"}), #"Expanded content" = Table.ExpandTableColumn(#"Removed Other Columns2", "content", {"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"}, {"content"}), #"Expanded content1" = Table.ExpandTableColumn(#"Expanded content", "content", {"properties"}, {"properties"}), #"Expanded properties" = Table.ExpandTableColumn(#"Expanded content1", "properties", {"http://schemas.microsoft.com/ado/2007/08/dataservices"}, {"properties"}) in #"Expanded properties" in SourceIf the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi elaine1217 ,
You need to fix the SharePoint site link and then you will be able to refresh it successfully.
let
Source = ( VersionsRelevantSharePointListName as text, VersionsRelevantItemID as number) => let
Source = Xml.Tables(Web.Contents("https://xxxxx.sharepoint.com/sites/winniz-test", [RelativePath= Text.Combine({"/_api/web/Lists/getbytitle('", VersionsRelevantSharePointListName ,
"')/items(", Text.From(VersionsRelevantItemID), ")/versions"})])
),
entry = Source{0}[entry],
#"Removed Other Columns2" = Table.SelectColumns(entry,{"content"}),
#"Expanded content" = Table.ExpandTableColumn(#"Removed Other Columns2", "content", {"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"}, {"content"}),
#"Expanded content1" = Table.ExpandTableColumn(#"Expanded content", "content", {"properties"}, {"properties"}),
#"Expanded properties" = Table.ExpandTableColumn(#"Expanded content1", "properties", {"http://schemas.microsoft.com/ado/2007/08/dataservices"}, {"properties"})
in
#"Expanded properties"
in
Source
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks! That worked for me