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 have a custom list that has a text filter connected to allow the user to filter one of the list columns. I now need to add a second XOR text filter to allow the user to filter on a different column in the list. The CAML for the query is:

    <FieldRef Name="Feeder"/>
    <FieldRef Name="Transformer"/>
            <FieldRef Name="Feeder"/>
            <Value Type="Text">{FilterFeeder}</Value>
            <FieldRef Name="Transformer"/>
            <Value Type="Text">{FilterTransformer}</Value>

This is kind of working but even when one filter is cleared, the filtered list still contains the rows defined by that filter, as well as any rows defined by the other filter.

How do I clear the rows retrieved by the first filter when applying the second one?

share|improve this question

I believe that when the one variable has no value, the CAML is still passing 'OR field = ""' which is returning results. If you set a default value for the first variable that would return no results, you might be able to exclude the values returned from that filter.

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.