5 Replies Latest reply on Apr 28, 2010 12:04 PM by jmoorma2

    Scripting Buttons



      Scripting Buttons


      I am new to FileMaker and am using FileMaker Pro 10.


      I am trying to create a button to automatically import information when I press it. However, I do not want others to be able to do this. How do I make the button so only I can perform the function?



        • 1. Re: Scripting Buttons



          Ideally you would control who can run the script using Accounts&Privileges under File>Manage>Accounts&Privileges.


          You could then set your script into an If check:


          If ( Get(AccountName) = "jmoorma2" )

              Insert the script here



          The If will avoid the annoying "your privileges do not allow this" pop-up, but the true security is to be had via Privilege settings.

          • 2. Re: Scripting Buttons

            In addition to what Ninja wrote, I have a number of buttons that can only be used by people (managers) logging in with certain account privileges.


            But, what I also did was to use conditional formatting so that the buttons disappear (text turns to same color as background) when somebody uses the file who does not have the necessary account privileges to access the buttons.  That way they don't even know the button is there.

            • 3. Re: Scripting Buttons

              Thanks! I was trying to figure it out all day and trying to change privileges would have been a major headache as we are on a shared server with over 100 people. Thanks again!!!

              • 4. Re: Scripting Buttons

                Careful, such a hidden button can still be clicked and may still turn your cursor pointer into a hand when you hover over it.


                Your script will still need to check for an account name or privilege set name (a better option if you want to enable a button for a group of users.) to keep it from executing or triggering the accounts and privileges error dialog.

                • 5. Re: Scripting Buttons

                  Thanks for the warning. I did't use the hidden button just made the script with the button to allow on my account name to be able to access the script/use the button.