Hi @Mike_N ,
Firstly, "relational" lookups are not Delegable in SharePoint so you need to do something like the below. The sort on the first ones is just a bit of "future proofing" and will use the newest 2,000 (if you have your limit set to this) records in each in the query
With(
{
wInInfo,
Sort(
'Incident info',
ID,
Descending
),
wInjType,
Sort(
'Injury type',
ID,
Descending
),
wAntLoc,
Sort(
'Anatomical Location',
ID,
Descending
),
wIntAsst,
Sort(
'Initial assessment',
ID,
Descending
),
wVitals,
Sort(
Vitals,
ID,
Descending
),
wNarrative,
Sort(
Narrative,
ID,
Descending
)
},
ClearCollect(
colPCRs,
AddColumns(
'Patient info',
"IncidentInfo",
LookUp(
wInInfo,
Patient_ID = ID
).YourFieldName,
"InjuryType",
LookUp(
wInjType,
Patient_ID = ID
).YourFieldName,
"AntLoc",
LookUp(
wAntLoc,
Patient_ID = ID
).YourFieldName,
"IntAsst",
LookUp(
wIntAsst,
Patient_ID = ID
).YourFieldName,
"Vitals",
LookUp(
wVitals,
Patient_ID = ID
).YourFieldName,
"Narrative",
LookUp(
wNarrative,
Patient_ID = ID
).YourFieldName
)
)
)
I have done a blog on Delegation that may be of interest to you.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.