3 Replies Latest reply on Mar 8, 2011 3:48 AM by RossanoIennarelli

    Lock a field after the input



      Lock a field after the input


      i want lock a field after the input, How can I do that?

        • 1. Re: Lock a field after the input

           I am assuming that you mean after a record has been committed once, and not a situation where a new record has been requested, a field has been 'filled', then preventing the user to go back and change the field after initial entry. 

          Are you are using Filemaker 11?  If so, you could store your current field values in variables using a script that triggers on record load. Then fire a script that is triggered on object validate which checks the current field value with the one stored in the variable. If they are different and the variable does not hold an empty value, display a dialog to say so, and copy the the value in the variable back to the field.

          Any further questions, just ask.


          • 2. Re: Lock a field after the input

            Or AnObjectEnter script trigger can perform a script that uses GoTo Field or Go To Object to move the cursor/focus to another object on your layout if the field is not empty. That's simpler, but sometimes picking a place to set the focus that doesn't confuse your user can be a challenge. (I've sometimes placed a small invisible button with no assigned action next to the field, given it an object name and then used Go To Object to give it the focus. This button can even be made part of the layout's tab order if you want.)

            • 3. Re: Lock a field after the input

              I used the Frinholp's solution, on the enter of object if is empty a variable is set to 1,if not is set to 2 and a variable take the value in the object, when exit if the variable is different to the object value and the variable is set to 2, it set the object at the variable value.

              thank a lot!!