Multiple Joins

May 11, 2015 at 11:33 AM
It seems that CamlJS doesn't allow me to build complex queries with multiple joins, say
OrderItems - Orders - Customers:
<View>
  <Query>
    <OrderBy>
      <FieldRef Name="ID" />
    </OrderBy>
  </Query>
  <ViewFields>
    <FieldRef Name="LinkTitle" />
    <FieldRef Name="Amount" />
    <FieldRef Name="Product_x003a_Category" />
    <FieldRef Name="Country" />
  </ViewFields>
  <ProjectedFields>
    <Field Name='Country' Type='Lookup' List='Customers' ShowField='Country' />
  </ProjectedFields>
  <Joins>
    <Join Type='INNER' ListAlias='Orders'>
      <Eq>
        <FieldRef Name='Order0' RefType='Id' />
        <FieldRef List='Orders' Name='ID' />
      </Eq>
    </Join>
    <Join Type='INNER' ListAlias='Customers'>
      <Eq>
        <FieldRef List='Orders' Name='Customer' RefType='Id' />
        <FieldRef List='Customers' Name='ID' />
      </Eq>
    </Join>
  </Joins>
  <RowLimit Paged="TRUE">1000</RowLimit>
</View>
I could not find an option to join a third list by column of already joined list. The List attribute of the source FieldRef (Orders in my sample) is missing in the code generated by CamlJS.
May 11, 2015 at 3:11 PM
Hi,

Thanks for detailed description!
I'll try to squeeze some time in coming days to investigate this.