Select matching record


I have 2 types: TypeFR and TypeAM.
TypeFR has {wuc: WorkUnitCode, typeAM: [TypeAM]}
TypeAM has {wuc: WorkUnitCode, end: datetime}.
I want to get end where TypeFR.wuc == TypeAM.wuc.
Assume TypeFR.wuc has 1 matching record or the first record.

pseudo code:
TypeFR {
endDate: datetime stored calc “typeAM.(TypeAM.wuc == TypeFR.wuc).end”
Is this scenario supported or how can I achieve this or any workaround?

1 Like