5 Replies Latest reply on Apr 8, 2014 1:33 PM by BillPlunkett

    Opening second FM database in script step

    BillPlunkett

      Title

      Opening second FM database in script step

      Post

           This seems so obvious I'm probably missing something in the book or the Knowledge Base.

           How can I open a second FM database (Hidden) and then call a layout in the 2nd file from the 1st one?

            

           thanks

        • 1. Re: Opening second FM database in script step
          philmodjunk

               Open File will open the 2nd file and there's a check box to select to specify "hidden" as an option for this.

               But what do you mean by "call a layout"?

          • 2. Re: Opening second FM database in script step
            BillPlunkett

                 I would like to have a button on a layout in file 1 that will display a layout from file 2

            • 3. Re: Opening second FM database in script step
              philmodjunk

                   At which point file 2 is no longer hidden and that's why I am puzzled at the requirement that the file be open but hidden.

                   The simplest way to do this is to define a script in File 2 as: Go to Layout [specify the layout you want here]

                   Then, in file 1, use Perform Script to perform this file in File 2 to show the layout. This will open the file, if not already open and switch to the desired layout at the same time. But if you want a specific set of records displayed on that layout, you'll need more than go to layout. In that case, you might use Go to Related records to open File 2, switch to the desired layout and show a set of related records. In other cases, you might use Perform Script with a script parameter to pass data from a script in File 1 to a script in File 2 that uses that data as find criteria so that it can switch layouts and also find the desired records.

                   But don't forget that you can also define an external data source reference in File 1 that refers to a table in File 2, then you can add a table occurrence to it in order to define relationships, design layouts create values lists and scripts that refer to this table all from within the context of File 1. Any reference to this table occurrence will automatically open File 2, but hidden in the background.

              • 4. Re: Opening second FM database in script step
                BillPlunkett

                     Know I understand what to do.  It was your last paragraph ("But don't forget that...") that is what I am really trying to get to.  I thought the external sources were for ODBC database and the like.  I didn't understand that you can define another FM database as an external source.

                     Thanks a lot, you have really helped - as always.

                     bill

                      

                • 5. Re: Opening second FM database in script step
                  BillPlunkett

                       Now I understand what to do.  It was your last paragraph ("But don't forget that...") that is what I am really trying to get to.  I thought the external sources were for ODBC database and the like.  I didn't understand that you can define another FM database as an external source.

                       Thanks a lot, you have really helped - as always.

                       bill