Forum Discussion

collinq's avatar
collinq
Super User
5 years ago
Solved

SharePoint List - Getting ALL the data from ALL the specific lists in the Site

I don't think this should be as hard as I have made this on myself and so I am reaching out hree.  I have a SharePoint Site with the same list on many different sub-sites.  I have created a list of t...
  • MFelix's avatar
    MFelix
    5 years ago

    Hi collinq ,

     

    You need to create the function based on the sharepoint list then you need to create a source that is a list of values with the url then run the function on that code something like this:

     

    let
        Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WyigpKSi20tcvzkgsSi3Iz8wr0UvOz9UvzixJLdZXio0FAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Site = _t]),
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"Site", type text}}),
        #"Added Custom" = Table.AddColumn(#"Changed Type", "Page", each {"A", "B", "C"}),
        #"Expanded Page" = Table.ExpandListColumn(#"Added Custom", "Page"),
        #"Added Custom1" = Table.AddColumn(#"Expanded Page", "ListURL", each [Site]&[Page])
    in
        #"Added Custom1"

     

    then run the custom function based on the ListURL column