5 Replies Latest reply on Feb 10, 2010 1:54 PM by philmodjunk

    Click return/enter with a script.

    CraigFiore

      Title

      Click return/enter with a script.

      Post

      Hello,

      In my data base I have certain field that are locked. I used a LOCK field, when i need to unlock the fields, i type "password" in the LOCK field. In some cases i need to duplicate a record. When i click duplicate, i get a warning to "revet or continue" I am trying to writing a script to add "password" to the LOCK field to open the record but it is not working. 

       

      I thought i could wright a script and have it click "enter" a couple time to get me through the warnings then i could enter "password" 

       

      Any other ideas would be helpful. 

        • 1. Re: Click return/enter with a script.
          philmodjunk
             Have your script "unlock" the record, duplicate the record, and then either lock one or both records by setting the field back to it's locked value.
          • 2. Re: Click return/enter with a script.
            CraigFiore
               Thanks for the help, but i tried that because it does not work because i have a trigger script that locks the record when i enter the record. I did not know of any other way to have it automatically lock the fields. Is there a better way?
            • 3. Re: Click return/enter with a script.
              philmodjunk
                

              Maybe I'm assuming the wrong kind of locking here. Are you trying to lock the record so other users on the network can't edit the record or is this a case of locking the record so that another person who does not have the right access privileges cannot edit it?

               

              I assumed the second type of "lock". This is a technique usually set up with custom privileges that prohibit editing and/or viewing a record unless a specific value is stored in a field.

              • 4. Re: Click return/enter with a script.
                CraigFiore
                   The locking is so other users can not edit certain fields. Everyone can view the record. It is not associated with access privileges.
                • 5. Re: Click return/enter with a script.
                  philmodjunk
                    

                  CraigFiore wrote:
                  The locking is so other users can not edit certain fields. Everyone can view the record. It is not associated with access privileges.

                  Filemaker automatically locks record for you while you are editing them and then releases it when you commit the record by clicking on a blank area of the layout, switching to a different record or through a script that commits the record.

                   

                  Any other locking should be done with access privileges. If you use the advanced search link above, you can search this section for several good threads on how to use Access privileges to lock records. Use "Record Locking" as your keywords.