Forum Discussion
kroman
1 year agoHelper II
Getting 'One or more table references a dynamic Data Source' even with Web.Contents with Relativepat
Hi All
I have a simple query where trying to get a site url from one item in SP list and then get files list from that site, by following code:
let
Source0 = Json.Document(Web.Contents("https://MyOrg.sharepoint.com/sites/DigitalWorkplaceReporting/_api",
[
RelativePath="web/lists/GetByTitle('SPSites8')/items",
Query=[
#"$top"="50", //This is the size of the batch
#"$filter"="StatusN eq 1"
],
Headers=[ Accept="application/json;odata=nometadata" ] //changing headers return a JSON Document
]
)
),
value = Source0[value],
value1 = value{0},
TheSite = value1[SiteUrl],
Source = SharePoint.Files(TheSite, [ApiVersion = 15]),
#"Sorted rows" = Table.Sort(Source, {{"Date created", Order.Ascending}}),
#"Filtered rows" = Table.SelectRows(#"Sorted rows", each [Date modified] < #datetime(2017, 5, 1, 0, 0, 0)),
#"Sorted rows 1" = Table.Sort(#"Filtered rows", {{"Date modified", Order.Ascending}}),
#"Expanded Attributes" = Table.ExpandRecordColumn(#"Sorted rows 1", "Attributes", {"Size"}, {"Size"}),
#"Changed column type" = Table.TransformColumnTypes(#"Expanded Attributes", {{"Size", type number}}),
#"OldFiles" = Table.Sort(#"Changed column type", {{"Size", Order.Descending}}),
#"Removed Columns" = Table.RemoveColumns(OldFiles,{"Content"})
in
#"Removed Columns"but still getting 'One or more table references a dynamic Data Source' despite using Web.Contents with Relativepath option (which, lots of people claims, should resolve this issue)
Any idea why its happening?
Thanks
11 Replies
- lbendlinSuper User
No need to use Web.Contents for SharePoint lists. Use the Standard SharePoint List connector.