7 Replies Latest reply on Sep 13, 2011 8:47 AM by philmodjunk

    Import Records script imports all records not just found set.

    JimTeiper

      Summary

      Import Records script imports all records not just found set.

      Product

      FileMaker Pro

      Version

      11v2

      Operating system version

      OS X 10.6.4

      Description of the issue

      Import Records script always imports all records from another FMP database even when the found set is a single record.

      Steps to reproduce the problem

      Set an FMP database with found records to export.
      Switch to database to export to.
      Run Import records.
      All records- not just found are imported.

      Expected result

      Import found set only.

      Actual result

      All records imported

      Workaround

      None

        • 1. Re: Import Records script imports all records not just found set.
          LaRetta_1

          The use of a few terms can be confusing here.  In FM, it is best not to refer to databases.  We use Files and Tables.  Also, there is no need to export (and I believe you aren't exporting but the use of the term could confuse).  You have a file with a table you wish to import into.  Let's call this Customers.  You have another file called NewCustomers (which comes from a different source).  You want to import only SOME NewCustomers into Customers.  Add NewCustomers into your graph and call it NewCustomers.  Create a layout based upon NewCustomers.  Then pseudo-script might look like this:

          Go to Layout [ layout based upon NewCustomers ]

          Perform Find [ find your record set you wish to 'export' ]

          Go to Layout [ layout based upon Customers ] *

          Import [ specify SAME FILE then select your NewCustomers as source (on left) and Customers as target (on right).

          * It is no longer necessary to be on target layout when specifying import via script but I am unsure in which version the behavior changed nor which version you are using so I am playing it safe.

          Please let us know if I'm off base on your setup.  We'll help you through this. :^)

          • 2. Re: Import Records script imports all records not just found set.
            JimTeiper

            Thanks- But I'm sorry, LaRetta, I still don't get it. Create Master in your graph? What does that mean? Master has 11 layouts and 2K records. I've been exporting to seperate DB's to keep copies seperated by type and year. All these DB's are established and pretty involved. I understand 11 different than 6 but the Help part still sucks.... And no manual.

            Again, no graphs or tables established anywhere. Is what the drop menu and I are calling DB's what you are calling files? I still don't get why an import/export would be more than the found set.

            I think you're saying to remake the DB's I've setup and been exporting to as seperate layouts in Master- but those seperate layouts would still contain all records and not a subset which is the intention so I'm just not getting it. So confused I am....

            • 3. Re: Import Records script imports all records not just found set.
              LaRetta_1

              Hi Jim, no I wasn't suggesting you redo anything but that you consider the differences between vs. 6 and vs. 11.  To catch folks up, I was messaged that "All were originally setup in FMP 6. I just got latest FMP 11 for OS 10. Script worked fine in v6."

              How did you migrate?  Did you read the white papers on migration from 6 to 7 structure?  You DO have graph and tables - look in File > Manage > Database and Relationships.  There are many things which are different between 6 and current versions and this isn't the only place you might have problems (commit record/request being one; windowing being another).

              I was attempting to explain how you can put your other file right in your graph (by, while in Relationships) clicking bottom left icon +, popping the pop-up and specifying 'add filemaker data source' and specifying your other file.  Then create a layout based upon that table occurrence.  Find your records on that layout, switch to the other layout and ... well, I listed out specific directions both on the other thread you posted and in the private message.

              I only used vs. 6 for few months and I don't remember how it worked but you are probably dealing with a windowing issue (selecting the proper window from the other file, which has changed since 7) but life will be much easier if you do all your work within the single file even if you have multiple files (just by putting references to them in the one file).  It would just mean re-specifying your import.

              YOu will certainly want to read up on the migration ... well, I wanted to post some links and now I can't find anything in Knowledge Base. It would help if you could upload your file somewhere (empty clone would be fine).

              • 5. Re: Import Records script imports all records not just found set.
                LaRetta_1

                Actually I was looking for the original Migration Methodologies and Key Concepts white papers.  I have them somewhere here so I'll try to find them and upload them.

                • 6. Re: Import Records script imports all records not just found set.
                  bablahemen

                   Hi Jim, i am also facing the same problem. did you got any solution? i have an database for Quotation. Table 1 contain customer & relataed data, and table 2 contains the item code & descptn. i can import the table1 single record data but from the table2 its import all the records related the the table 1 ID.

                  do u  have any solution. as its is an imp script for me.

                  • 7. Re: Import Records script imports all records not just found set.
                    philmodjunk

                    LaRetta has provided a solution here. With what part of it do you need help? (Let me know and I'll step you through the process.)

                    The table occurrence you specify as the "source table" and whether or not the file is open at the time you import are both factors that can affect whether your import imports all the records in the table or a found set of the records.

                    PS. Old threads like this no longer reappear in Recent Items when a new post is made to it. That makes it easy for others to miss the fact that a new response has been posted to it. You may want to start a new thread, but include a link to this thread in it so others can read the original info.