It seems like I can make a join for retrieving the title field, but I get an error as soon as I try to retrieve the FileLeafRef field (Value does not fall withing the expected range).
Here the CAML query which I use:
<View> <ViewFields> <FieldRef Name="myLookupField" /> <FieldRef Name="DocTitle" /> <FieldRef Name="DocName" /> </ViewFields> <ProjectedFields> <Field Name="DocTitle" Type="Lookup" List="myDocumentLibrary" ShowField="Title" /> <Field Name="DocName" Type="Lookup" List="myDocumentLibrary" ShowField="FileLeafRef" /> </ProjectedFields> <Joins> <Join Type="Left" ListAlias="myDocumentLibrary"> <Eq> <FieldRef Name="myLookupField" RefType="Id" /> <FieldRef List="myDocumentLibrary" Name="Id" /> </Eq> </Join> </Joins> </View>
If I remove FileLeafRef from the query it works. Any idea what's the error here?