A script such as:
If [Not IsEmpty ( GetField ( Get ( ScriptParameter ) ) ) ]
Go To Field // or use Go To Object to set the focus somewhere but in the field
Show Custom Dialog ["can't enter a value in both field read an field blue."]
Set this with the onObjectEnter Script trigger on each field and pass the name of the other field as a parameter. (On field Red, pass the name fo Field Blue, on Field Blue pass the name of field Red.)
I'm doing something wrong. Here is what i have. First the actual field names are "HoursWorked" and "Piece Qty"
I made a script:
If[not IsEmpty (GetField(Get(ScriptParameter)))]
Go to Field [LaborLog::Piece Qty]
Show Custom Dialog["Warning"]
I than set this script as onObjectEnter trigger script on the HoursWorked field.
But I am still able to enter number is both field and i do not get a warning message.
In the Optional Script Parameter Box, use GetFieldName ( yourtable::field ) to pass the field name to the script.
Thanks . It works great!
This approach also keeps your script triggers working even if you later go into Manage | Database and change the name of a field.