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.

  • are you using C# CSOM ? is it ok to use search rest api or you need real time info ? – Gautam Sheth Feb 2 '17 at 8:43
  • csom would be preferable .. if nothing works then will go for search rest api – Monica Jagani Feb 2 '17 at 11:04
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

  • Content query webpart can show only few fields ... i need to show data in tabular format , list list view – Monica Jagani Feb 2 '17 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 '17 at 11:07
  • let me try ... if that work it would be great. – Monica Jagani Feb 2 '17 at 11:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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