Join subsite lists on the site RRS feed

  • Question

  • Hi,

    a site has thousand of substites. Each of the substites has a list with ohwn site coloumns - only one row per subsite, because they represent site attributes.

    Ho to join all the rows from the subsites into a site list - without change the configuration on a higher level then the site ?



    • Edited by Michel777 Wednesday, May 29, 2013 5:43 PM
    Sunday, May 26, 2013 1:18 PM


All replies

  • Hi Michel,

    Here are 2 resolutions for your requirement.

    1. Use Content Query Web Part.
    2. Create a Visual Web Part to join all lists programmatically.

    Let me know if you have any further question.

    Thanks & Regards,

    Emir Liu
    TechNet Community Support

    Monday, May 27, 2013 8:09 AM
  • Hi Emir,

    it is not possible to join all the site lists with Content Query Web Part.  Couls you please giv me some intractions to the second Option (PowerShell) ?



    • Edited by Michel777 Wednesday, May 29, 2013 3:20 PM
    Wednesday, May 29, 2013 3:20 PM
  • Are you wanting to include the content too, or just the various columns?

    Steven Andrews | SharePoint Professional | |

    Wednesday, May 29, 2013 4:37 PM
  • Content only. The structures are identical (based on site columns).
    There is one structur, e.g.

    1. Column: Title
    2. Column: First Name
    3. Column: Last Name
    4. Column: Age

    The is e.g. 700 subsites. Each subsite has a list with this structure. The lists are filled, but in each subsite only with one row.

    The "main" site has a list with the same  structure too, but has no own data.

    The question: how to "join" all the rows from the 700 sites dynamically ?

    Dynamically: if a subsite will be deleted or created, the corresponding row should be deleted / inserted. Also a change on the substite (data in row will be changed) shoud be propagated to the "main" site.

    • Edited by Michel777 Wednesday, May 29, 2013 5:18 PM
    Wednesday, May 29, 2013 5:07 PM
  • Could you explain why the content query web part will not work for you? It is designed for this type of scenario of showing data from multiple sites / libraries in one list.

    Mike G.

    Wednesday, May 29, 2013 5:46 PM
  • I tried different combinations of Source / List Type / Content Type - without success. The most probably good combination: Show items from the following site and all subsites / Custom List / List Content Type  / Item (includ child Content types). Trying to set Fields to Display led to no succes:

    Error: "The site or list column "xxxx" does not exist or is not valid."

    Remark: the colums has been craeted only on  the subsite Level. After creating the same columns on the site Level: no error, but  also no data.

    Option: choosing a subsite as source gives only the one row of that subsite.

    Perhaps: delete the columns in the subsites, create them on the site level and used the site columns for building list for the site template ?

    • Edited by Michel777 Wednesday, May 29, 2013 8:37 PM
    Wednesday, May 29, 2013 7:40 PM
  • The issue is, that Content Query Webpart Shows only the first column.

    • Edited by Michel777 Friday, May 31, 2013 8:22 PM
    Friday, May 31, 2013 3:37 PM
  • Hi Michel,

    Since you have a large number of subsites, it is hard to create each data connection for the lists on every manually. I would like suggest you to create a Visual Web Part with Visual Studio. And you may refer to following resources to perform the custom code.

    Enumberate lists and subsites in sites.

    Display list data in GridView.

    Thanks & Regards,

    Emir Liu
    TechNet Community Support

    • Marked as answer by Michel777 Monday, June 3, 2013 9:10 AM
    Monday, June 3, 2013 8:27 AM
  • Emir, thanks a lot !

    Monday, June 3, 2013 9:10 AM