I have 1 to many related TOs: Patient_Event::__uuID = IO_event::_patient_event_uuID.
In IO_event are 2 fields:
- in_water_pc [% of a requirement]
- oc_Cum_in_water_pc [cumulative % of a requirement]
Both are presented in a 'Patient_Event' portal on the parent Patient layout. In the portal, both the % and the cumulative % are correct. However, if I look at the IO_event layout, for most records cumulative % = "?". Obviously if I export 'IO' records to Excel, cumulative % is incorrect.
I currently calculation cumulative % using this calculation from the 'IO_event' context:
If(Get(RecordNumber) = 1; in_water_pc;
GetNthRecord (oc_Cum_in_water_pc; Get( RecordNumber ) - 1 ) + in_water_pc) - 100
I have also tried using a summary field (see attached) but this fails to limit the summary to each _patient_event_uuID.
Aim: I'd like to have 'IO_event' records showing a cumulative % for each related Event.