2 Replies Latest reply on Jun 17, 2015 11:41 AM by ganesalingamnarenthiran

    Opening the second file which is pasword protected and going to the correct layout

    ganesalingamnarenthiran

      Title

      Opening the second file which is pasword protected and going to the correct layout

      Post

      Hello,

      I have got both FM Pro 13 and now 14. I have got two separate files. I have two questions:

      i) I have managed to link both files them with a common field. I have written a script so that when you click the button (associated with the script) the new file opens. How do It get it to open a particular layout of th enew opened file.

       

      ii) My second file is infact password protected. How can I embed the usename and password in the script to get the second file which is password protected to open.

       

      Thank you in advance for any of your suggestions!
       

      Naren


       

       

       

        • 1. Re: Opening the second file which is pasword protected and going to the correct layout
          philmodjunk

          The answer to 1 and 2 can be combined.

          Write a script in the second file that takes the user to the desired layout. In the first File, create a script or button that does a Perform Script. Specify the script in the second file and the script will open the file and perform the script to go to the desired layout. In the perform script script step, the drop down for selecting the script to perform includes an "add FileMaker data source" option that you can use to select a script from another file.

          If there are identical account names and passwords defined in both files, the above solution will work as described and the users will not be asked to enter a password.

          If matching account names cannot be set up, there are a pair of alternative approaches that can be used:

          A very minimal access account & password can be set up in the second file with file options set up to open the file automatically with these credentials. Then the script described above can use Relog in to log the user in with a password with better privileges. A script with the same relogin script step would need to be set up, via the OnFirstWindowOpen trigger in File Options to ask users for a password when accessing the file directly.

          or

          Open URL could be used to open the file using the FMP protocol. The URL text can include the password credentials and the name of the script to be run. (The script would be the go to layout script specified at the beginning of this post.)

          • 2. Re: Opening the second file which is pasword protected and going to the correct layout
            ganesalingamnarenthiran

             

            Hello PhilModJunk,

            Thank you very muchfo your detailed answer. I found it very useful.

            Naren