Forum Discussion
Combine Files From SharePoint Folder
- 5 years ago
So before you do the Combine operation, use the filters to filter out everything you do not need.
For example, set the filter to only keep files that end in CSV. If there are stilll files there you don't want, then start filtering to keep only files with certian words in them.
Then do the combine operation. Not only will this select a valid sample file, it will keep the entire thing from breaking. Even if this had selected the file you wanted first, it would have used that file as a template to transform your Timesheet file, which would have likely broken.One other thing you can do that I recommend. If your files are in one folder, use SharePoint.Contents().
When you create a connection to SharePoint folders it uses the SharePoint.Files() function by default. In the formula bar for the SOURCE row, change it to say SharePoint.Contents("https://blahblahblah" [apiwhtever]) - just change Files to Contents. Case sensitive.
Now you will browse by folder. Usually you click on Shared Documents table, then down to the folder you want. From there you can transform an entire folder.This is the best way when all files are in one folder. Much faster than SharePoint.Files performs.
One caveat - if you navigate down to the wrong folder there is no way to go back up without manually editing the M code. Usually faster to just delete the NAVIGATION step and start over from Shared Documents.
Thanks edhans,
The first file it is picking is a timesheet file that I do not need - just the 3 csv files in MyDemo Folder.
I tried entering additional URL info when prompted for the SharePoint Folder but I received an error that I could only select the root of the SharePoint Folder.
Thanks,
-w
- edhans5 years ago
Community Champion
So before you do the Combine operation, use the filters to filter out everything you do not need.
For example, set the filter to only keep files that end in CSV. If there are stilll files there you don't want, then start filtering to keep only files with certian words in them.
Then do the combine operation. Not only will this select a valid sample file, it will keep the entire thing from breaking. Even if this had selected the file you wanted first, it would have used that file as a template to transform your Timesheet file, which would have likely broken.One other thing you can do that I recommend. If your files are in one folder, use SharePoint.Contents().
When you create a connection to SharePoint folders it uses the SharePoint.Files() function by default. In the formula bar for the SOURCE row, change it to say SharePoint.Contents("https://blahblahblah" [apiwhtever]) - just change Files to Contents. Case sensitive.
Now you will browse by folder. Usually you click on Shared Documents table, then down to the folder you want. From there you can transform an entire folder.This is the best way when all files are in one folder. Much faster than SharePoint.Files performs.
One caveat - if you navigate down to the wrong folder there is no way to go back up without manually editing the M code. Usually faster to just delete the NAVIGATION step and start over from Shared Documents.