7 Replies Latest reply on May 4, 2011 11:10 AM by yuichim

    Multiple file login with one account

    yuichim

      Title

      Multiple file login with one account

      Post

      Hi,

      This may have been answered or asked many times, but I am creating a multi file, multi user solution that requires a login.

      How would it go by to allow users to login just once and let it access the main db file?  Or what would be the best ideal scenario?

      Here is my file structure:: I will have one file called main_db.fp7 that contains all tables and data.   Other files will be a layout file that contains layout but no tables nor data.  

      Any help much appreciated!

        • 1. Re: Multiple file login with one account
          philmodjunk

          On option is to use Server Authentication to control access to the files.

          Another is to define identical accounts and passwords in each file. Then the users can log in once and the system can then open all other files as needed without asking again for a password. Maintaining multiple accounts in identical fashion in all the flies can be a challenge. There are, however, ways that you can use scripts to keep account/password info in each of the other files synchronized each time you create or change an account in the main file.

          • 2. Re: Multiple file login with one account
            yuichim

            Thank you very much Phil!

            If you don't mind, would you be able to let me know which script you use to sync the accounts?

            I did take a look but I am a bit lost....

            • 3. Re: Multiple file login with one account
              philmodjunk

              I don't use a script for this, but have figured out how to do it by checking out the script steps found in the "Accounts" category in the script editor.

              Thus, I can't spell out all the details, but can give you a general outline.

              You can set up some text fields (usually global so that the values aren't retained) for entering account names, passwords and possibly for selecting a privilege set. You can then use perform script, passing this info as a script parameter, to perform a script in each file that does the necessary new account or change account operation. If you want a user to be able to do this who does not have a full access account, you can set the scripts to run with full access privileges.

              After you perform all the scripts on the other files, do the same operation on the main file and then use the relog script step in to reconnect to your file under the new info.

              • 4. Re: Multiple file login with one account
                yuichim

                Thanks Phil!
                I am going to try your method Smile

                • 5. Re: Multiple file login with one account
                  yuichim

                  So I tried to create some script to handle this but I am having trouble...

                  First, I created a global table to hold variables and created a scritp to set variables for each variables.
                  How do I pass multiple variables to another file?  It seems like you can set script parameter but you can only set one variable in it?

                  • 6. Re: Multiple file login with one account
                    philmodjunk

                    You can pass multiple values several different ways. As long as all or all but the last value is never empty, I prefer this approach:

                    Inside the script parameter, use the list function to combine several values in a list separated by carriage returns:

                    You might use: List ( Globals::AccountName ; Globals::Password ; Globals::PrivilegeSet )

                    If so, then the script receiving this parameter list can use:

                    GetValue ( Get ( ScriptParameter ) ; 1 ) to get the account name
                    GetValue ( Get ( ScriptParameter ) ; 2 ) to get the password
                    GetValue ( Get ( ScriptParameter ) ; 3 ) to get the privilege set

                    • 7. Re: Multiple file login with one account
                      yuichim

                      That is cool. Thank you very much.

                      I just tried and worked GREAT!!  Thank you very much!!