3 Replies Latest reply on Sep 27, 2013 6:58 AM by philmodjunk

    FileMaker doesn't import first real record when importing a text file with blank first record

    JohnDCCIU

      Summary

      FileMaker doesn't import first real record when importing a text file with blank first record

      Product

      FileMaker Pro

      Version

      FileMaker 12.0v4 Advanced

      Operating system version

      OS X 10.8.5

      Description of the issue

      Using File/Import or the Import Record script step, if you import a text file that has a blank first record, the import skips the blank record but also skips the first real record.

      As a side note, when this kind of file is chosen, the "Don't Import First Record (contains field names)" checkbox is checkmarked in the import dialog, but it's grayed out and you can't uncheck it.

      Steps to reproduce the problem

      Create a text file with a blank first record, and 5 records with some data in them.

      Expected result

      The blank first record should be skipped, but the remaining 5 records should be imported:

      Record 1:  One
      Record 2:  Two
      Record 3:  Three
      Record 4:  Four
      Record 5:  Five

      Actual result

      The blank first record is skipped but so also is the first real record.  The resulting table contains only 4 records.

      Record 1:  Two
      Record 2:  Three
      Record 3:  Four
      Record 4:  Five

      Exact text of any error message(s) that appear

      None

      Configuration information

      None

      Workaround

      None in FileMaker.  You can manually delete that first blank record in the import file to get around the problem that way

      Screen_Shot_2013-09-26_at_4.13.19_PM.jpg

        • 1. Re: FileMaker doesn't import first real record when importing a text file with blank first record
          philmodjunk

               Which text file import did you select? Tab or CSV?

               Using the option for a Tab file and importing into an existing table (did not specify "new" in the target table drop down.), I am not able to reproduce this issue with FileMaker 12.04 on windows 7.

               Thus, the issue might be mac OS specific or it could be that I did not perfectly reproduce the steps you took to import the data. (And the "do not import first row" check box was NOT greyed out.)

          • 2. Re: FileMaker doesn't import first real record when importing a text file with blank first record
            JohnDCCIU

                 Thanks for checking it out:  as I go back and start fresh to reproduce this, it appears that the issue I'm reporting has more to it.  

                 First, surround the text fields in the test file with quotes (see updated screenshot), since that seems to make the behavior more consistent.

                 When importing, select Show Merge Files as the file type in the file picker dialog.  You'll see the behavior mentioned, with only 4 records shown and the checkbox grayed out.  I was using an existing database where the default Import type had ended up as Merge Files (I think it defaults to the last successful Import Type).  Obviously this file is not in proper Merge File format, so all bets may be off if the user actually chooses that.

                 However, I was changing the type to All Available before choosing the file, and the choice "sticks" as Merge Files, even though the user has changed the type to All Available before choosing the file.  Changing Show explicitly to Tab-Separated Text Files or Comma-Separated Text Files avoids the issue.

                 Without the quotes in the import file, the "stickiness" of the Merge Files choice after choosing All Available was intermittent.  After I put the quotes in (which was how the original file that I ran across was formatted), then the behavior was consistent.

                 Now that I know it's related to the All Available choice, a little more searching in the forums turned up Must choose file type for import to work correctly.

                  

            • 3. Re: FileMaker doesn't import first real record when importing a text file with blank first record
              philmodjunk

                   Merge files all have the field names in the first non blank row. Thus, when you import with that option selected, I would expect the first non blank row of data to be skipped. FileMaker does retain the last option used and "all files" doesn't specify a file type so it will again revert to the options last specified if they will work with the file type of the file you select. Thus, this only should happen with text files since they can be imported as tab, csv or merge.