AnsweredAssumed Answered

Script to prevent leaving a field blank

Question asked by LeoB on Mar 5, 2010
Latest reply on Mar 5, 2010 by LeoB


Script to prevent leaving a field blank


In a new record layout, on the name field in the layout I have a script triggered OnObjectExit.  It's a tabbed field on the layout.


The script is:


     If [Is Empty (Activity::ActivityName)]


         Show Custom Dialog

         Go to Field [Activity::ActivityName]

     End If


When a user does not complete the field and attempts to tab out of it or go to another field, the beep and custom dialog work, but then the user is taken to the next tabbed item instead of returning to the ActivityName field.  I tried moving the Go to Field line after End If, but no change.


How would I write this script so that the user absolutely positively cannot go anywhere else until the field is filled in?


Many thanks.