2 Replies Latest reply on Mar 18, 2013 7:49 AM by donblaylock

    Importing Find Results from another Filemaker Database

    donblaylock

      Title

      Importing Find Results from another Filemaker Database

      Post

           I have two databases.  Main and Templates.  In the Main database I have a layout that is assigned to a table in the Templates database.  I want to filter the results in a table in the Templates database and then import just those records into a table in my Main database.  My script IN MAIN looks something like this:

           Go to Layout["TemplateDetails" (TemplateDetails)]    // points to Templates::TemplateDetails

           Perform Find [Restore]    //  The criteria for this Find is TemplateDetails::TemplateID [=$$TemplateID]  // Verified $$TemplateID is correct and search results are correct

           Import Records [No dialog, "Templates.fmp12"; Add Mac Roman]  // This imports all the records in the TemplateDetails table instead of the filtered set.  

           Any help is greatly appreciated

        • 1. Re: Importing Find Results from another Filemaker Database
          philmodjunk

               Import records imports a found set of records when the file from which the data is imported is already open as is the case here.

          But, found sets are specific to a given table occurrence. The found set you produce in your Main file does not have any effect on any found sets you may have in the template file because your found set was created via a table occurrence in the Main file--not template.fmp12.

               You could perform a script in the template file to find these records, passing the criteria as a script parameter to that script, but you do not have to in this case.

               It may not look like it, but import records steps actually refer to a table occurrence of a table in the specified source file. You just need to set up the import records step to import records from Main, via the table occurrence of your table from the template file. When you select the file for this import records step, select the copy of Main that you already have open. Then select the TemplateDetails table occurrence you already have in Main as your "source table".

               For more on Table Occurrences, see this thread:Tutorial: What are Table Occurrences?

          • 2. Re: Importing Find Results from another Filemaker Database
            donblaylock

                 PhilModJunk

                 You are correct.  I changed the import from the Template.fmp12 file to my Main file and it works perfectly.  

                 THANKS!  smiley