1

I'm new to SharePoint Online/SPFx development after spending several years building front-end webparts in SharePoint 2013 with JS/jQuery. I'm used to using the SharePoint API, but the functionality seems to have expanded significantly, and I'm not sure what the best route is to solve my problem.

Here's the scenario: I have a site meant to collect responses to a question being put to all employees in the organization. Because we need to track who has and has not responded to the question, it will be necessary to create a record for each employee in advance. I will then build a form that allows users to look themselves/their direct reports up (using a people picker field) and submit their response, which will fire off an update to their list item.

Because of the number of employees in the organization, it will be necessary to split the employee response records across multiple lists. I need to figure out a way to search multiple lists to find the pertinent record. So, if I have List A, List B, and List C, and Bob Smith is in List B, I need to write a call that looks through all 3 lists, finds Bob Smith in List B, and returns his information.

Does anybody have any recommendations about the best endpoint or something else entirely to accomplish this? Thank you!

1 Answer 1

0

As the requirement is to create multiple lists due to the large number of records you can follow below steps

  1. Create site columns
  2. Create one Content type and add all the site columns in that Content type
  3. Create all the lists by using the Content type created in step #2

Now to perform the search you can use SharePoint search rest API to search the content based on the content type.

GET http:// _server_/_api/search/query?querytext='Text_To_Search&contenttype:CONTENT_TYPE_NAME'

Reference:

https://docs.microsoft.com/en-us/sharepoint/dev/general-development/sharepoint-search-rest-api-overview

How to get all items with a specific content type using REST Api

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.