3 Replies Latest reply on Apr 22, 2013 7:21 AM by JimMac

    How to lock a field based on value of another field

    KeithMcArdle

      Title

      How to lock a field based on value of another field

      Post

           Hi Everyone

           On my Invoice layout, I have a field named "Status".  Which when that field turns to "received" as the invoice is completed I would like the layout to be non edible, but you can still edit three of the fields, for example one of them fields being called "priceEx"

           Any help would be greatly appreciated

           Thanks

        • 1. Re: How to lock a field based on value of another field
          JimMac

               Several ways...

               I am guessing that you want to "Commit" that invoice then later, want to prevent a future change.....

               You can set a new "Commited" Status field the you can compare with future attempts to change that useing "OnObjectEnter" script.  The Object being the Status Field the User set.  I call the new field say... Commited Status.

               So when the Usert changed it to "On Order"  your script would compare Commited to User and sends an Error message and resets the User Field back to "Recieved"

               Jim...

          • 2. Re: How to lock a field based on value of another field
            philmodjunk
                   
            1.           You can set validation calculations in field options on each field you want to lock that reject all input if the status field = "received".
                        
                        or
                         
            2.      
            3.           You can move the three fields into a related table and then user record level access control to block changes to the invoice record (and maybe a set of line items records?) while the three fields no located in a related table remain editable. See "Editing record access privileges" in FileMaker Help and check out this particular sub section: "Entering a formula for limiting access on a record-by-record basis" for a description of how to set this up.
            • 3. Re: How to lock a field based on value of another field
              JimMac

                   And another...angel

                   You create a New Field called "Frozen Record".  You set that on record committed.  Once set you then switch to a duplicate Layout where all fields of interest have the Browse mode off  and therefore cant be changed in that new Layout.

                   Jim...