TCC – Logical Or Filter (redux)

Okay, the last one I published doesn’t have the cut and paste ability for the complex filter, so here it is:


<quer:filtering xmlns:quer="http://www.taleo.com/ws/integration/query">
 <quer:or>
 <quer:equal>
 <quer:field path="UserAccount,Groups,Name"/>
 <quer:string>usmagn</quer:string>
 </quer:equal>
 <quer:equal>
 <quer:field path="UserAccount,Groups,Name"/>
 <quer:string>uspacs</quer:string>
 </quer:equal>
 </quer:or>
</quer:filtering>

2 Comments

  • Marc
    October 3, 2014 - 3:13 am | Permalink

    Hi

    Would you know how to filter for more than 2 values?

    Cheers!

    -Marc

    • October 5, 2014 - 4:38 pm | Permalink

      Yes, you just need to add another ‘or’ invocation at the top and close it after you use the statement defining it, the operation used in the sample is equal but you should be able to use anything else on it. Here is a sample with three ‘or’ subjects, it can go on ad infinitum.

      
      <quer:filtering xmlns:quer="http://www.taleo.com/ws/integration/query">
       <quer:or>
       <quer:or>
       <quer:equal>
       <quer:field path="UserAccount,Groups,Name"/>
       <quer:string>usmagn</quer:string>
       </quer:equal>
       <quer:equal>
       <quer:field path="UserAccount,Groups,Name"/>
       <quer:string>uspacs</quer:string>
       </quer:equal>
       </quer:or>
       <quer:equal>
       <quer:field path="UserAccount,Groups,Name"/>
       <quer:string>uspacs</quer:string>
       </quer:equal>
       </quer:or>
      </quer:filtering>
      
      
  • Comments are closed.