Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

Joining lists using CAML.

$
0
0

I am trying to join to lists in CAML. The lists are connected by a look up column - "Field_x0020_Name". 

Below is the query and I it gives me 'Value does not fall within expected range' no matter what. Please point out where my mistake is. I am really struggling to figure this out.

<View>
<Joins>
<Join Type="INNER" ListAlias="Fields">
<Eq>
<FieldRef Name="Field_x0020_Name" RefType="Id" />
<FieldRef List="Fields" Name="ID" />
</Eq>
</Join>
</Joins>
<ProjectedFields>
<Field Name="kpi" Type="Lookup" List="Fields" ShowField="Is_x0020_KPI" />
</ProjectedFields>
<ViewFields>
<FieldRef Name="Report_x002d_Tab_x0020_Name" />
<FieldRef Name="Field_x0020_Name" />
<FieldRef Name="kpi" />
</ViewFields>
<Query>

<Where>
<And>
<Eq>

<FieldRef Name="Report_x002d_Tab_x0020_Name" />

<Value Type="Lookup">some value here</Value>

</Eq>
<Eq>

<FieldRef Name="kpi" />

<Value Type="Boolean">TRUE</Value>

</Eq>
</And>
</Where>

</Query>
<RowLimit>100</RowLimit>

</View>


Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>