1

In a CAML Query I filter for multiple lookup fields by combining multiple <Or> statements.

This caused a log entry like this: Some lookup fields were omitted from the query result because the list exceeds th elookup column threshold...

I know that the threshold can be configured in the settings of the web application, but that's not what I want.

I just figured out that CAML also offers an <In> synthax. In its syntax the lookup field appears only once.

<In>
  <FieldRef LookupId="TRUE" Name=WhateverField/>
  <Values>
    <Value Type="Integer">11</Value>
    <Value Type="Integer">12</Value>
    <Value Type="Integer">13</Value>
 </Values>
</In>

So my question is:

Does that count for one lookup or for three concerning the Sharepoint lookup threshold? So ist this an option to get around the threshold problem or not?

1 Answer 1

1

I found out, that the problem that caused the query to exceed the lookup column threshold was not the amount of columns in the WHERE or the IN clause, it was the amount of lookup columns delivered by the result. So i restricted the amount by using SPQuery.ViewFields to solve this problem.

However - the research I did to find that out led me the the fining, that the amount of columns used in a IN query does not matter concerning the lookup column threshold.

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.