2

Site contents - Multiple lists tagged with particular content type "CT1". The lists are dynamically created based on business requirements to will keep on adding in the site contents.

Requirements: Pull all the matching items from all the lists with content type = 'CT1' & assigned to = current user.

Environment : SharePoint online

Can anyone help me with the CAML query or any approach to show the data based on above mentioned requirement.

2
  • are you using C# CSOM ? is it ok to use search rest api or you need real time info ? Feb 2, 2017 at 8:43
  • csom would be preferable .. if nothing works then will go for search rest api Feb 2, 2017 at 11:04

1 Answer 1

2

You can achieve this using REST. Below is the endpoint for REST

/_api/search/query?querytext='contenttype:ContentTypeName'

And you can also achieve this using Content Query Webpart. Below is the link to support.office.com documentation on this: https://support.office.com/en-us/article/Display-data-from-multiple-lists-with-the-Content-Query-Web-Part-d560f477-8fc1-4258-aeb2-70aa932e07da

3
  • Content query webpart can show only few fields ... i need to show data in tabular format , list list view Feb 2, 2017 at 11:04
  • You can try modifying ItemStyle.xsl to format the data. I have modified it in on prem though not sure about online.
    – Amit
    Feb 2, 2017 at 11:07
  • let me try ... if that work it would be great. Feb 2, 2017 at 11:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.