AnsweredAssumed Answered

Related values only problem

Question asked by tays01s on May 31, 2015
Latest reply on Jun 13, 2015 by tays01s


Related values only problem


Part of 1 of my scripts is:

Go to Layout [ “Calc” (Calc) ]

Go to Related Record [ From table: “Calc”; Using layout: “Calc” (Calc) ] [ Show only related records ]

Go to Record/Request/Page [ Last ]
If [ Patient::__ID=Calc::_PatientID and Calc::Date_calc = Get ( CurrentDate ) ]

Show Custom Dialog [ Title: "Already a 'Calc' for this date"; Message: "A 'Calc' already exists for this date. To change 'Config', delete this 'Calc' record (this will delete the associated IO record and feeds for this date), then select 'New' Calc."; Default Button: “OK”, Commit: “Yes” ]

Unfortunately I find the Custom dialogue being triggered when there is ANY Calc record of the same date instead of only Calc records of the same date & same patient. In fact I'd thought my early script lines should have made the script criter "Patient::__ID=Calc::_PatientID" unecessary. However, even the latter failed. I'm missing something obvious?