This project is read-only.
1
Vote

Multiple JOINs

description

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.

comments