AnsweredAssumed Answered

Tabs: Prevent movement until specified fields are filled

Question asked by tays01s on Nov 9, 2015
Latest reply on Nov 11, 2015 by okramis

I want to prevent users moving off the 'new record' tab until they have completed critical fields. I tried the script below triggered on tab exit, but the focus still shifted to the 'default' tab:

Commit Records/Requests [ No dialog ]

If [ IsEmpty ( Patient::Lastname or Patient::Firstname or Patient::BirthDate or Patient::Sex ) ]

Show Custom Dialog [ Title: "Complete patient info"; Message: "You must complete critical fields before leaving this tab:"& Case(IsEmpty(Patient::Lastname);"Lastname";
IsEmpty(Patient::Lastname);"Birthdate" ); Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]

Go to Object [ Object Name: "tab_patient" ]

End If