Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Scripted import of CSV file - remembering that rec 1 is header


This topic is 4931 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a script that uses an Import step to import a .csv file. The Import step's options are (a) do not specify data source, (: perform without dialog, © specify import order.

It appears that, because of option (a), option © cannot be set to ignore the first record which contains column headers. But I specifically don't want to pre-specify a data source, in order for the user to be prompted to locate the file.

How does one use this set of Import options and skip the first record in the .csv file? And, since I'm about to upgrade, is there a better way in FMP9adv?

Thanks,

Chap

Posted

Hi,

I am using Filemaker pro 9 Advanced, So not sure if procedure is the same in Filemaker 8. However, if you create a script and select import records, then select specify data source and select file type comma-separated text files and then select ok, you get a dialogue box that defaults to field names. If you ok this and then de-select the specify data source and specify import order and save the script, it retains the info for file type. When the script is run the user will need to select the file and once they do, it will import records, but not the first line. I have tested on my system and it works. Hope this helps.

regards,

Sdig.

Posted

Thanks - in the meantime I've upgraded to FMP9, and after following your instructions to the letter I'm getting good results. Hoping it'll hold!

Chap

  • 3 years later...
Posted

I have the same problem, and the solution works fine on one machine, but in a networked environment, the "don't import first row" option doesn't hold from one (Windows) workstation to the next. As soon as I use the same steps on another workstation, it drops the "don't import first row" option on the first.

I tried single user mode (not served) and used a script instead of attaching a script step to the button, but every new session drops the "Don't import..." option.

In the end I had to include a script step to delete the first record after the import.

This topic is 4931 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.