3 Replies Latest reply on Mar 31, 2009 12:35 AM by nilkse

    Locking down records

    nilkse

      Title

      Locking down records

      Post

      Hi I have a specific requirement and was wondering if anyone can help. i have created my own database and what i need to do is once all the mandatory fields have been filled in i want that record to then be locked and only be editable again on the pressing of a button of some sort. Is this possible and are there any pointers anyone can give me.

       

      best regards

        • 1. Re: Locking down records
          philmodjunk
            

          nilkse wrote:

          Hi I have a specific requirement and was wondering if anyone can help. i have created my own database and what i need to do is once all the mandatory fields have been filled in i want that record to then be locked and only be editable again on the pressing of a button of some sort. Is this possible and are there any pointers anyone can give me.

           

          best regards


           

          Nilkse,

           

          The database that I spend most of my time supporting is a POS type invoicing system. Thus, once an invoice has been printed handed to the customer, the record (and records from a related table) cannot not be modified further. That sound familiar?

           

          Here's how I do it:

           

          I've defined a status field that my scripts can check to see if has been printed or not.

          I lock and hide the status area so that users can't use the "book" control to manually flip through records

          Since all record to record navigation is controlled by script, I have two layouts:  In one layout all the fields are open for editing. In the duplicate layout, they are all locked. The scripts check the record's status field and select either the "locked" or "unlocked" layout for the given record.

           

          To control field access on a layout, select the field in layout mode and choose Field/Control | Behavior...

           

          The above method works for all versions of FMP back to 3.0. If you are using FMP 10, you have a new option. You can set script triggers on your layout that check the status of your record and switch between locked and unlocked copies of your data entry layout.

           


          • 2. Re: Locking down records
            Jade
              

            Alternatively, the last technique described in this thread is also effective…

             

            http://forum-en.filemaker.com/fm/board/message?board.id=FM-en-4&message.id=8174#M8174 

            • 3. Re: Locking down records
              nilkse
                

              Thanks for your responses I will have a go at this and let you know how I get on. I really appreciate your help.