I want to use left outer join in my caml query in java script. I am little bit confused how to use joins. Please anyone explain an easy example of left outer join query in caml.

1 Answer 1


There is an excellent tool available to help with complex CAML queries in JS especially when working with joins: https://camljs.codeplex.com/

Joining lists via CamlJs is very easy. Here's the example:

var query = new CamlBuilder()

Camljs will automatically generate the appropriate CAML query for you. So the resulting generated CAML query will be the following:

    <FieldRef Name="Title" />
    <FieldRef Name="Country" />
    <FieldRef Name="Population" />
    <Join Type="LEFT" ListAlias="Country">
            <FieldRef Name="Country" RefType="ID" />
            <FieldRef Name="ID" List="Country" />
    <Field ShowField="People" Type="Lookup" Name="Population" List="Country" />
            <FieldRef Name="Population" />
            <Value Type="Number">10</Value>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.