3 Replies Latest reply on Oct 27, 2015 1:29 PM by coherentkris

    Filemaker asking for credentials for a related database

    cfawcett09

      Hi,

       

      I have two different databases that are hosted on the same Filemaker Server.  I have set up a relationship between one table in database 1, and one table in database two.  This allows certain fields to autopopulate based on a lookup function.  All of that works great, but recently we are having the problem where when it tries to do the lookup, it asks for the credentials for the related database.  I have tried everything i can think of, i have tried opening the related database in hidden in the startup script for the first database, but it still asks for credentials, I have tried having it automatically log in with the guest credentials when it is opened, but this generates the problem where when someone is trying to open that database to actually make records, it wont allow them to because it automatically logs in as guest.

       

      Is there any way to set it such that in my startup script for the primary database, it will open the related file with a certain set of credentials (in this case, guest credentials), but when i try to access the related database normally, it still asks for credentials?

       

      Any help would be greatly appreciated.

        • 1. Re: Filemaker asking for credentials for a related database
          Mike_Mitchell

          cfawcett09 wrote:

           

          Is there any way to set it such that in my startup script for the primary database, it will open the related file with a certain set of credentials (in this case, guest credentials), but when i try to access the related database normally, it still asks for credentials?

           

          I'm not 100% certain what you're asking here, but if you put the same credentials in the parent database as in the related database, when the relationship needs something, it will automatically pass its credentials along. Which means, in this scenario, if you put the guest credentials in the parent database and log in with those, it will log into the related database as a guest.

           

          Where you have an issue is if the related database is already open and you want to do something that requires more than guest level access. In such a case, it'll still be open as a guest, which will not be what you want. So one solution would be to use the Re-Login script step as part of your OnFirstWindowOpen script to force the database to ask for credentials. You could do something like this:

           

          If [ Get ( CurrentAccountPrivilegeSetName ) = "[Guest]"

               Re-Login [ ]

          End If

           

          That way, if the user logged into the related database as something else, it wouldn't trigger a second login.

           

          If this doesn't answer your question, please elaborate and we'll try again.   

           

          Mike

          • 2. Re: Filemaker asking for credentials for a related database
            bigtom

            Do you have all the exact same users and privilege sets in both files? If the file is an external FileMaker data source it should be fine even with a guest account.

             

            I have had this happen if the external data source is ODBC and you do not choose to save the credentials.

            • 3. Re: Filemaker asking for credentials for a related database
              coherentkris

              the account name in both files must match and the account in the secondary file must be assigned to a privilege set that allows whatever you are trying to do.