Forum Discussion

ElizabethTachji's avatar
ElizabethTachji
Helper III
5 years ago

SharePoint subsites (project sites) dynamically

Hi, Is there a way I can capture Sharepoint subsites dynamically without a custom function.  In the example below, I call each subsite and then append.  Is there a way of dynamically bring in all subsites in one go.  That is I dont need to list each subsite like I have below.  thank you inadvance.

 

let

    Source = SharePoint.Tables("https://CompanyName.sharepoint.com/sites/SiteName/1", [Implementation=null, ApiVersion=15]),

    Source1 = SharePoint.Tables("https://CompanyName.sharepoint.com/sites/SiteName/58", [Implementation=null, ApiVersion=15]),

    Source2 = SharePoint.Tables("https://CompanyName.sharepoint.com/sites/SiteName/84", [Implementation=null, ApiVersion=15]),     

    Source3 = SharePoint.Tables("https://CompanyName.sharepoint.com/sites/SiteName/241", [Implementation=null, ApiVersion=15]),

    Source4 = SharePoint.Tables("https://CompanyName.sharepoint.com/sites/SiteName/474", [Implementation=null, ApiVersion=15]),  

    Source5 = SharePoint.Tables("https://CompanyName.sharepoint.com/sites/SiteName/908", [Implementation=null, ApiVersion=15]),      

    Source6 = SharePoint.Tables("https://CompanyName.sharepoint.com/sites/SiteName/1102", [Implementation=null, ApiVersion=15]),

    Source7 = SharePoint.Tables("https://CompanyName.sharepoint.com/sites/SiteName/1248", [Implementation=null, ApiVersion=15]),

     Source8 = SharePoint.Tables("https://CompanyName.sharepoint.com/sites/SiteName/1276", [Implementation=null, ApiVersion=15]),

     Source9 = SharePoint.Tables("https://CompanyName.sharepoint.com/sites/SiteName/1320", [Implementation=null, ApiVersion=15]),

     Source10 = SharePoint.Tables("https://CompanyName.sharepoint.com/sites/SiteName/1369", [Implementation=null, ApiVersion=15]),

     Source11 = SharePoint.Tables("https://CompanyName.sharepoint.com/sites/SiteName/1394", [Implementation=null, ApiVersion=15]),

 

    Final = Table.Combine({Source, Source1,Source2,Source3,Source4,Source5,Source6,Source7,Source8, Source9,Source10,Source11 }),

    #"Filtered Rows" = Table.SelectRows(Final, each ([Title] = "CHANGE")),

2 Replies