In this example, we are going to turn a field into a button. This button will run a script that will decide whether or not we get to click into the field.
In this example, we are going to say there a 4 possible ways we can enter into the Test Field and any other situation will not allow you to enter into the field. Here is a breakdown of the options ...
Admin User - If you are signed in as admin, you can click right into the field. I added some buttons on the example layout for you to shuttle between admin access and typical user access.
Find Mode - If you are in Find Mode, you can click into the field. This is because we don’t have a need to protect the data in find mode.
Empty Field - If the field is empty, you can click into it. The first record has data in it but the second record does not. Feel free to navigate to that record and give it a test.
Modifier Key Override - You may need to have a way for some users to be able to override the script. Using the Get(ActiveModifierKeys) function, I allow you to enter into that field.
An example file can be downloaded by clicking (here).
© 2010 - Dwayne Wright - dwaynewright.com
The material on this document is offered AS IS. There is NO REPRESENTATION OR WARRANTY, expressed or implied, nor does any other contributor to this document. WARRANTIES OF MERCHANT ABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY DISCLAIMED. Consequential and incidental damages are expressly excluded. FileMaker Pro is the registered trademark of FileMaker Inc.