With Pop up menus, check boxes and radio button formats, use OnObjectModify. With Drop down lists, OnObjectExit usually works better (with drop downs, you can type text in the fields and you don't want this script to fire with each keystroke.)
A simple "brute force" approach is for your Field_one trigger to have a single line:
Set Field [ Table::Field2 ; "" ]
This clears field2 everytime some one modifies/exits field1.
A more sophisticated script can be set up to clear field2 only if it is not a member of the value list for field 1. You can combine the valuelistItems and FilterValues functions to do this:
If [ IsEmpty ( FilterValues ( ValueListItems ( Get ( filename ) ; "YourValueListNameinQuotes" ) ; Field_two ) ) ]
Set Field [ Table::Field_two ; "" ]
Note: you can put the databae file name in quotes in place of Get (Filename) but then renaming your file will cause this function to fail. In either case, renaming your value list will cause ValueListItems to fail until you update it to refer to the new name.
Thank you Phil;
Your brute force approach did the trick. Sophistication is nice, but I need simple solutions.:smileywink: I added a GoTo(theSecondaryField) script step. These fields were not on the default tab of a two tab layout, and every time a user clicked out of the primary field, the default tab would show up before the user would see the secondary field.
Your insight into the best suited script triggers helped a lot also; I really appreciate you adding that extra bit of information.