AnsweredAssumed Answered

OnPanelTrigger

Question asked by tays01s on Dec 7, 2015
Latest reply on Dec 7, 2015 by tays01s

I have some tabs on the same layout where I want to stop the user moving to another tab until they've completed vital data. With some help from the forum, the reaction to the 'tab_patient' works fine. 2 things:

1. I'm being a bit ignorant in not understanding exactly what 'Exit Script [ Result: False ]' does?


2. And I haven't succeeded in getting the 2nd tab to react correctly.

 

Commit Records/Requests [ No dialog ]
If [ GetValue ( Get ( TriggerCurrentPanel );2 ) ="tab_patient" ]

If [ IsEmpty(Patient::Lastname) ]

Show Custom Dialog [ Title: "Complete patient info"; Message: "You must complete If(IsEmpty(Patient::Lastname);"Lastname";""); Default Button: “OK”, Commit: “Yes” ]

Exit Script [ Result: False ]


If [ GetValue ( Get ( TriggerCurrentPanel );2 ) ="tab_calcs" ]

If [ IsEmpty(Calc::cm) or IsEmpty(Calc::kg) ]

Show Custom Dialog [ Title: "Complete patient info"; Message: "You must complete critical fields before leaving this tab:"&¶ &

If(IsEmpty(Calc::cm);"cm";"")&¶ &
If(IsEmpty(Calc::kg);"kg";""); Default Button: “OK”, Commit: “Yes” ]

Exit Script [ Result: False ] Else

Go to Object [ Object Name: Get ( TriggerTargetPanel ) ]

End If

End If

End If

End If

 

Outcomes