0

I would like to know, is there a way to build such a CAML Query, or is this nonsense:

I have a SharePoint List with two ContentTypes: ServiceGroup and Services. The Fields are

  1. Title
  2. ServiceGroup [MultiLookup to Service]
  3. Service[Lookup to ServiceGroup]
  4. Responsible[Person]

A ServiceGroup can contain many Services. For ServiceGroups and Services many Persons could be responsible.

For this given list I want to select with a CAML Query all ListItems of ContentType ServiceGroup for which person 'ABC' is responsible AND all Services, which are "Children" of the ServiceGroups, selected within the first Query part, regardless of whether person 'ABC' or someone else is responsible for them.

  • Hi, I can build a CAML Query with one or more WHERE conditions( with u2u caml query builder) without error, but I don't know how I can use the result of the first query part(ListItems of Type ServiceGroup) in the second part(Services which are Children of the given ServiceGroups). – user615993 Jul 13 '15 at 19:54
1

Are you using the server object model? If so, try to use SPMETAL. With this in mind you are able to query your context with Linq. When building large queries i think this is the most useful way.

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.