Hi there,
Has anyone used caml join queries when querying data from sharepoint? Do you know if is possible to retrieve fields from the parent list through projectedfields, I can join and return fields from the child list but not the parent. Have been playing with this for sometime but no joy. I am wondering if this only works server side and not through the web api. Below is what I am working with: Nomination Detail is the child list with a lookup to the parent list using column 'Nomination'. I want to show the NominationDate from the parent list (Nominations), so I created a projectedfield and added it to the viewfields. But it will only show fields from the child list. Any guidance appreciated.
_api/web/lists/GetByTitle('Nomination Detail')/GetItems(query=@v1)?@v1=
{"ViewXml":"
<View>
<ViewFields>
<FieldRef Name='ID'/>
<FieldRef Name='YearOfService'/>
<FieldRef Name='NominationDate'/>
<FieldRef Name='Nomination'/>
</ViewFields>
<Joins>
<Join Type='INNER' ListAlias='Nominations'>
<Eq>
<FieldRef Name='Nomination' RefType='Id'/>
<FieldRef Name='ID' List='Nominations'/>
</Eq>
</Join>
</Joins>
<ProjectedFields>
<Field Name='NominationDate' Type='Lookup' List='Nominations' ShowField='NominationDate'/>
</ProjectedFields>
</View>
"}
Michael E. Gernaey
497
Super User 2025 Season 2
David_MA
436
Super User 2025 Season 2
Riyaz_riz11
244
Super User 2025 Season 2