1 2 Previous Next 15 Replies Latest reply on Apr 27, 2013 11:01 PM by JohhnyHilly

    Access a layout by password



      Access a layout by password


           I would like to somehow setup a layout so that it can only be accessed if a password is entered. Does anyone know how this can be done? I'm aware that a text field and custom dialogue box can do it but I don't actually know how to set that up.

           Thanks in advance,

        • 1. Re: Access a layout by password

               The preferred method is to use separate user Accounts and different Privilege Sets (File>Manage>Security…).

               See chapter 6, page 128 of the User's Guide (Help>Product Documentation>User's Guide) for complete details.

          • 2. Re: Access a layout by password

                 Thanks Jade, I have already had a look through the User Guide. I don't want to completely prevent a certain User from accessing the layout, I want them to still access it, just they need to enter a password before getting access to it.

            • 3. Re: Access a layout by password

                   Granted, you can do this using a custom dialog box (or modal window) and compare the user input with a global field or calculated variable.

                   Then you must manage the password, password changes, and security using a standard FMP table and layout tools.  

                   IMO, it's easier, more secure, and achieves the same purpose using the Re-login scripstep and a different Privilege set.  This way, FMP handles the password management for you.

              • 4. Re: Access a layout by password

                     Thanks for the headsup. For the moment I would just like to use a password as it's a basic database. Do you know how I can set it up with the custom dialogue box?

                • 5. Re: Access a layout by password

                       You will need several things:

                       • a table where you can define two global fields—one for the correct password (calculated) and one for the user's input (text)

                       • uncheck the box called 'Include in layout menus' found in the Layout Setup in layout mode for your protected layout.

                       • a button or layout/event trigger that the user must use to go to the protected layout

                       • a script associated with the button or trigger to: display the custom dialog and acquire the user's input; compare the input with the password field; go to the layout if they match.  It would be something like this:

                       Show Custom DIalog[ "Password Required"; "Enter your Password"; your_table::users_input]  // check the box 'Use password character (•)'

                       If[ your_table::users_input = your_table::password|

                            Go to Layout[your_protected_layout]



                       End If

                  • 6. Re: Access a layout by password

                         @Jade  I will bet you a cup of tea that I can still get to your layout without a password.  I give you a yes for a great effort though.

                         @Johnny Hill 

                         You can set up Security... for all normal users as Guests and use Re-login function for that Layout which would require a differenct USER and Password.  I admit the User Guide it so "complete" it can cause confussion.

                         But Security is so well done and thourough, I feel very confident on Hacker proofing your databases.  Good Luck.


                         PS: FMP User and Passwords are NOT retrievable and I have had to "intercept" them and scramble them to assist in local users when they say "I lost my password".

                    • 7. Re: Access a layout by password


                           I guess that you didn't read the whole thread.

                      • 8. Re: Access a layout by password

                             @Jade  Oh yes i did, about 3 timeswink.  I am 100% agreement with you.  My note to you was.... I was very impressed at your attempt at a Security type  "work around".  Well done.  Well done.  Well done.  OK. 

                             But... and now more clearly aimed a Point to Hill, even YOUR brilliant work has no true prevention because your OUTSTANDING thought is done at the FMP "interpreter" level , where as FMP Securitty... was done at the "machine language" coding level, and therefore can't be intercepted at the USER level.  I hope more Clear now for you.

                             @ Hill  Try the Security part of FMP because....

                             1) Documentation of what you trying is needed for future work on you database

                             2) FMP is a reliable company and will make sure future upgrades will be compatible, will yours?

                             3) You will be amazed at the power and ease of use of FMP Security...

                             4) Try it!  You will love it.


                        • 9. Re: Access a layout by password

                               Ok thanks for the input from both of you. I have set it up as Jade has described and works fine (re the custom dialogue box). I am also looking at the Re-Login scriptstep. I have one question with this, once the "re-login" has been done, how do I go to the layout I want to password protect? Because at the moment, all the re-login is doing is logging in as a different user. Do I need to use the Get (LastMessageChoice) function?

                          • 10. Re: Access a layout by password

                                 Use Get (accountPrivilegesetname ) in an if step to check and see if the system is now logged in with a privilege set that permits access to the layout. If it is, then your next step is go to layout.

                            • 11. Re: Access a layout by password

                                   Jade and I both recommended use FMP Security.  You didn't want to do that.  Jade gave you a well thought out way to work around FMP security and still provide you a way to limit a Layout use by.... Your own table of passwords and user names.

                                   Therefore you can't use Re-Loginfrown.  That is part of the FMP security!

                                   Phil's response is assuming you are using FMP Security.

                                   So... if you are doing Jade's work around, Jade's last post dated 4/21/2013.  You will need Jade's help again.


                              • 12. Re: Access a layout by password

                                     Jim, as you said, try it and you'll love it so this is what I am doing. Like I said, Jade's workaround worked great and I am now trying the Re-Login scriptstep. I'm learning FM so it's all new to me so I like to enquire about more than one solution.

                                     I have got the FMP Security working from Phil's description. Thanks. However, when the script is run, the window appears to enter the Account Name and Password. If at this point you click 'cancel', another Filemaker window appears saying "Re-Login has been canceled. Do you wish to continue with this script?" When you click "continue" here, it will take me to the layout without requiring the Account Name and Password, which defeats the purpose of the Re-Login. How do I stop this happening? I'm just trying to eliminate all ways the user could accidentaly find themselves on this layout.

                                     My script is attached for your information.


                                • 13. Re: Access a layout by password

                                       Now your cookin....yes

                                       Look at this link for a forum discussion on the Cancel problem using Re-Login.  You can use Get( LastError) to guide your logic immediatley after Re_login.

                                  Relogin and security...

                                       Phil added to the discussion at end to complete the options.

                                       If after reading that link you still need some help.  Chime back in.


                                       PS:  My first few trys at Security... was pure YUKKK.  FMP5.   It is much improved today and i would go so far to say 99% hacker proof.  So we all had our newbie days.  I had one 4 days ago.crying

                                  • 14. Re: Access a layout by password

                                         Set error capture can supress this dialog just like you can use it with a scripted find to supress the "records not found" dialog.

                                    1 2 Previous Next