I have a spquery using join to retrieve data from two lists.
I want to retrieve the field "Author" of child list. I use the projectedfields but the query return an error.
It seems that because of the parent child having also a field name "Author", you can not retrieve the value of the field "Author" of the child list.
Is there any way to retrive that value in the SPQuery?
$spquery = New-Object Microsoft.SharePoint.SPQuery
$spquery.Joins = "
<Join Type='LEFT' ListAlias='List1'>
<Eq>
<FieldRef Name='CodigoPeticion' RefType='Id' />
<FieldRef List='List1' Name='ID' />
</Eq>
</Join>
"
$spquery.ProjectedFields = "<Field Name='Author' Type='Lookup' List='List1' ShowField='Author' />"
$spquery.ViewFields = "<FieldRef Name='Author' />"
$outcomes=$miweb.Lists["Planes"]
$result=$outcomes.GetItems(($spquery))
$result|foreach {$_.item("Author")}