I have a SharePoint list that I need to filter according to this:
First of all, the items must be Booked by = Travel and Meeting Support and the Category should never be visible if they are Cancelled. Beside of these conditions, I also want the following to apply:
I want to see the items which has Category = New or Category = Pending (as long as they are booked by Travel and Meeting Support).
I do not want to see items which has Category = Completed AND Application Status = Approved. This means that I want to see Category = Completed as long as they do not have Application Status = Approved and vice versa. Of course only if they are Booked by = Travel and Meeting Support. (When it comes to Application Status = Approved, the items can not be visible if they have Category = Cancelled.)
I have tried to create a filtered view, but since it is difficult to group the conditiona snd there is a limitation of maximum 10 conditions, I can't make it work. I also tried CAML Designer, but it is not flexible enough. I also tried to modify the CAML code from the CAML designer, but still... either I get errors or I don't get the desired result.
Can anyone guide me with what I'm doing wrong?
This is one of the CAML code snippets that I've tried with:
<Where>
<And>
<Or>
<Or>
<And>
<And>
<Eq>
<FieldRef Name='Booked_x0020_by' />
<Value Type='Choice'>Travel and Meeting Support</Value>
</Eq>
<Neq>
<FieldRef Name='Category' />
<Value Type='Choice'>Cancelled</Value>
</Neq>
</And>
<Eq>
<FieldRef Name='Category' />
<Value Type='Choice'>New</Value>
</Eq>
</And>
<Eq>
<FieldRef Name='Category' />
<Value Type='Choice'>Pending</Value>
</Eq>
</Or>
<Neq>
<FieldRef Name='Category' />
<Value Type='Choice'>Completed</Value>
</Neq>
</Or>
<Neq>
<FieldRef Name='Application_x0020_Status' />
<Value Type='Text'>Approved</Value>
</Neq>
</And>
Booked by
,Category
andApplication Status
?