Forum Discussion
Anonymous
6 years agoNot applicable
SharePoint Online Folder Parameters
Hi, My company is moving to SP onine, and I'm in the process of migrating a lot of my source data and chaging data source paths for my reports... I have a document library on my site that contains a...
- Anonymous6 years ago
When I connect to my Sharepoint online, I receive a field called Folder Path. I am able to filter on this path. Are you not getting the same field?
Jimmy801
6 years agoCommunity Champion
hello Anonymous ,
on the normal sharepoint it was possible to navigate to the folder as described in following example. However I don't have access to a online sharepoint and therefore can't test it there. Give it a try and let us know
let
Source = SharePoint.Tables("YourSharepoint", [ApiVersion = 15]),
GotoLibrary = Source {[Id="IDofYourLibrary"]}[Items],
RenamedColumns = Table.RenameColumns(GotoLibrary,{{"ID", "ID.1"}}),
FilterForURL = Table.AddColumn
(
RenamedColumns,
"ContainsFilterCriteria",
each if Text.Contains(_[Folder][ServerRelativeUrl], "YourSearchCriteriaForFolder") = true then true else false
),
FilteredRows1 = Table.SelectRows
(
FilterForURL,
each ([ContainsFilterCriteria] = true)
),
RemovedOtherColumns = Table.SelectColumns
(
FilteredRows1,
{"Folder"}
),
ExpandedFolder = Table.ExpandRecordColumn
(
RemovedOtherColumns,
"Folder",
{"ItemCount", "Name", "ServerRelativeUrl", "WelcomePage", "Files", "ListItemAllFields", "ParentFolder", "Properties", "Folders"}, {"ItemCount", "Name", "ServerRelativeUrl", "WelcomePage", "Files", "ListItemAllFields", "ParentFolder", "Properties", "Folders"}
),
ExpandedFiles = Table.ExpandTableColumn
(
ExpandedFolder,
"Files",
{"CheckInComment", "CheckOutType", "ContentTag", "CustomizedPageStatus", "ETag", "Exists", "Length", "Level", "MajorVersion", "MinorVersion", "Name", "ServerRelativeUrl", "TimeCreated", "TimeLastModified", "Title", "UIVersion", "UIVersionLabel", "Author", "CheckedOutByUser", "ListItemAllFields", "LockedByUser", "ModifiedBy", "Versions"}, {"CheckInComment", "CheckOutType", "ContentTag", "CustomizedPageStatus", "ETag", "Exists", "Length", "Level", "MajorVersion", "MinorVersion", "Name.1", "ServerRelativeUrl.1", "TimeCreated", "TimeLastModified", "Title", "UIVersion", "UIVersionLabel", "Author", "CheckedOutByUser", "ListItemAllFields.1", "LockedByUser", "ModifiedBy", "Versions"}
)
in
ExpandedFiles
If this post helps or solves your problem, please mark it as solution.
Kudos are nice to - thanks
Have fun
Jimmy