3

I use CAML Query to perform inner join between two lists. It works when the lookup field is single value. However, when this field is multiple value, it always throws error:

the value does not fall within the expected range

I just wonder that Does SharePoint support this kind of query with lookup multiple value field? If so, what is the correct syntax?

Are there any alternatives to perform such kind of query?

This is the caml query. Anyway, when I edit the lookup field to allow single value, then it works. So, it must be due to the type of lookup field.

query.Joins = "<Join Type='INNER' ListAlias='Cat'>" +
              "<Eq>" +
                  "<FieldRef Name='Category' RefType='ID'/>" +
                  "<FieldRef List='Category' Name='ID'/>" +
              "</Eq>" +
         "</Join>";

query.ProjectedFields = "<Field Name='CatTitle' Type='Lookup' List='Category' ShowField='Title'/>";
  • Please mention the error that you are getting – Yash Saraiya Dec 2 '15 at 6:58
  • can you share the Kaml query ? – Shahroz Shaikh Dec 2 '15 at 7:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.