Do not exit layout until field is populated.
I am trying to write a script that will only allow the layout to be exited,if the field Event Date has a value. I thought something like the following under the script trigger Onlayoutexit would work
If (isempty(events:event date)) then
Custom dialog "Please supply the event date"
Exit script 
but it does not. thanks