Forum Discussion
Lean M for SharePoint connector to folders
- 5 years ago
Hello
Yes, just add a new column in the Exceltable called Typ. Input Folder or Sharepoint. In M-language you can refer now to this new column with an if-statement like if [Type] = "Folder" then Folder.Files... else Sharepoint....
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy - 5 years ago
Thank you Jimmy801 - that makes sense for the Excel table UI
Using Sharepoint.Contents I can navigate to the correct folder. However that creates many steps which would be annoying (or non value adding) to feedback into the Excel UI. Maybe I will just live with the hardcoding as it does solve the problem of not being user specific which is an improvement to C:\
let Source = SharePoint.Contents("https://company123.sharepoint.com/SharePointSite/", [ApiVersion = 15]), Project1 = Source{[Name="Project1"]}[Content], Folder2 = Project1 [Name="_Study_Specific"]}[Content], Customer3= Folder2 {[Name="Customer3"]}[Content], Account4 = Customer3{[Name="Account4"]}[Content], in Account4
Hello
Yes, just add a new column in the Exceltable called Typ. Input Folder or Sharepoint. In M-language you can refer now to this new column with an if-statement like if [Type] = "Folder" then Folder.Files... else Sharepoint....
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
- OKgo5 years ago
Helper IV
Thank you Jimmy801 - that makes sense for the Excel table UI
Using Sharepoint.Contents I can navigate to the correct folder. However that creates many steps which would be annoying (or non value adding) to feedback into the Excel UI. Maybe I will just live with the hardcoding as it does solve the problem of not being user specific which is an improvement to C:\
let Source = SharePoint.Contents("https://company123.sharepoint.com/SharePointSite/", [ApiVersion = 15]), Project1 = Source{[Name="Project1"]}[Content], Folder2 = Project1 [Name="_Study_Specific"]}[Content], Customer3= Folder2 {[Name="Customer3"]}[Content], Account4 = Customer3{[Name="Account4"]}[Content], in Account4