5 Replies Latest reply on Jul 6, 2015 4:18 AM by philmcgeehan

    Automatically open/login to a shared DB

    philmcgeehan

      Title

      Automatically open/login to a shared DB

      Post

      I have created a main solution that we are using now all the time in our business.

      More recently I have created a secondary, separate database that relates to the main one.

      For some context, the main DB holds all jobs, estimates, customer information and products details, et cetera. The new separate DB is used for manipulating the quantity of stock of those products.

      My question is: when the user opens up the secondary DB and logs in, a message pops up saying the other DB is in use and could not be opened, and to open it in using the Open Remote command. If I do this it works fine, but I don't want the user to have to log in twice; is there a way around this, so they only need to log in once?

        • 1. Re: Automatically open/login to a shared DB
          philmodjunk

          If both files have the same account name and password defined in manage security, a button that uses Open File to open the second file (Use Open Remote option when setting up the Open File Step to open the other file.) will open the second file without asking the user to enter an account name and password.

          This works because file make will use the credentials used to open the first file to open the second file and only resorts to a log in dialog if no matching account is located in the second file.

          • 2. Re: Automatically open/login to a shared DB
            philmcgeehan

            But I don't want to open the other file, just access the data within it.

            • 3. Re: Automatically open/login to a shared DB
              philmodjunk

              And how would you access the data in a file without opening it? It may only be opened as a hidden background file but you have to have it open.

              If you have matching account credentials, you only need go to Manage | External Data Sources or Manage | Database | Relationships to set up an external data source reference to the other file.

              From Manage | Database | Relationships, you can click the button for adding a new Table Occurrence (bottom far left) and then select the "add FileMaker Data Source" option to open a dialog where you find the other file and select the needed table from that file. You now have a table occurrence that you can link to any of the other table occurrences just as though the table  were local to your current file. And, as long as the log in credentials can match, anytime a part of your file references data in that table occurrence, FileMaker will quietly open that file in the background and the data in that table becomes accessible.

              • 4. Re: Automatically open/login to a shared DB
                philmcgeehan

                It's still not opening as I'd expect. There might be something more to it though - my admin console is inaccessible from all but the server machine; I think there's a problem with the web server, I've contacted FM support and they're currently looking in to my log files.

                I have set up the same user and password in both database files. And in the secondary "stock" database, the first layout it opens is a list view of a table occurrence from the primary "products" table.

                When FM get back to me, I'll see if it works as I expect then.

                Thanks

                • 5. Re: Automatically open/login to a shared DB
                  philmcgeehan

                  I still haven't got the web server up and running, but that's for a different topic.

                  I have however managed to get the database to open without the popup message though; it seems I had the external data source filepath set to the direct location of the file and not the remote address.

                  It used to say:

                  filewin://SERVER/FileMaker Server/Data/Databases/Database1

                  Now it says:

                  file:Database1

                  Ooops!

                  Thanks Phil.