SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to filter list by multiple possible values of one specified field, how can i do this in code?
I have following lists: Initiatives, Classes of Initiatives and Departments.enter image description here

I need to retrieve list of Iniciatives, filtered by Classes, that are filtered by Divisions.. So in fact I have for example 2 classes and want to show iniciatives of these two classes.

share|improve this question

Department Name should be a lookup column in the Classes List. The Class Name should be a lookup column in the Intiative List. By doing this , you create the basic foreign key relationship as depicted in the diagram.

The above should give you the basic structure to build customized queries on aggregated results from these lists using Dataview webpart. This will help you get started :-

share|improve this answer
I know about lookups) thank you for the link, i just thought that I can do it somehow by linq or caml query – Ksesh Jul 17 '12 at 9:34
up vote 0 down vote accepted

Find it! Element In - just what I need)

                                     <FieldRef Name='Title' />
                                          <Value Type='Text'>xx</Value>
                                          <Value Type='Text'>yy</Value>
                                          <Value Type='Text'>zz</Value>
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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