3 Replies Latest reply on Aug 11, 2009 8:54 AM by mrvodka

    Protect field contents during browse

    rwhart

      Title

      Protect field contents during browse

      Post

      Hi all.  I am new to FileMakerPro but have used other RAD tools, mainly FoxPro.  Is there a way that field contents can be made non-editable in FMP and then made editable by a script attached to a button?  I am very concerned that field contents could be easily and inadvertently changed by errant fingers.

       

      Thanks,

       

      Bob

        • 1. Re: Protect field contents during browse
          davidhead
            

          Hi Bob

          Welcome to FileMaker Pro!

          As you correctly note, 'out of the box' a FileMaker Pro database is very open. Perhaps the easiest way to enforce some kind of process in editing a record is to use the Privilege Set settings. With a number field called Lock, you can specify that records can only be edited when Lock = 0. A new record may have Lock set to 1 and a script is used to change it to 0 so the record can be edited. This may happen while the script is paused. When the script resumes, the Lock field is reset to 1.

           

          It is not too hard to set up but you do need some understanding of Accounts and Privileges (and use them!).

           

          Ask more questions if you can't get it to work. We still can't post sample files here :( 

          • 2. Re: Protect field contents during browse
            philmodjunk
              

            Here's a simpler but less flexible option:

             

            Use Field/Control | Behavior to prevent access to the field in browse mode. (This is less flexible because all users are locked out where using accounts and privileges allows you to permit access on a user by user basis.)

             

            To edit the field, a button can either switch the user to a different layout where this is permitted or even pop-up a new window or custom dialog with an input field.

            • 3. Re: Protect field contents during browse
              mrvodka
                

              Although, you can lock out changes with security or non-enterable fields as the others have suggested, from your post it seems that you may just want a pause before a record is changed so that stuff isnt changed "by errant fingers"

               

              If so, in your layout setup options, there is a checkbox for "Save record changes automatically". If you uncheck that box, your users will get a prompt asking if they want to save the changes when they try to commit the record.