September 21, 201411 yr I have a slight problem with some UI that I am hoping someone could help me with. We have a small bit of UI where the user is supposed to pick a 'type'; if that 'type' is 'book', then we want them to enter data into a 'book_name' field. However, if the 'type' is not 'book' (there are 5 other options), then we don't want them to be able to interact with the 'book_name' field at all. Now, we have accomplished the functionality of preventing this by putting a 'onobjectentry' script trigger on 'book_name' that checks the 'type' field, and if type is not 'book' then it moves them to another field. However, the user is still able to click on the drop-down arrow for the 'book_name' field, and it shows them the list of existing names for a moment. (It appears that the trigger doesn't fire until mouse-up.) I would like to some how prevent them from being able to see the pop-up value list, no matter how brief. Keep in mind that this is FM12, not 13, so we can't use the nice 'hide' formatting. Thanks, J
September 21, 201411 yr Here's one way: • give your existing name field an object name. Uncheck the “arrow” option for the drop down, and remove the object trigger • make a copy of the field object, recheck the arrow option and get rid of the value list (or create an empty dummy value list and assign that). • put the new field over the original field, and assign the script trigger OnObjectEntry • modify your script: If [ Table::type ≠ "book" ] Commit Record Else Go to Object [ "objectNameOfTheRealFieldObject" ] End If There's also the “portal row trick” that would allow you to make the field effectively “disappear”, depending on the type. http://www.seedcode.com/filemaker-13-hiding-objects/
Create an account or sign in to comment