Jump to content

[FP5] Creating an Import Template for Re-use


jmiskey
 Share

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

Recommended Posts

  • Newbies

We are using FileMaker 5.5. I have never used FileMaker before, but I am quite familiar with databases like Access and Excel (and I know VBA within these applciations).

I have been asked to create a program to import new clients into a FileMaker database. I found some instructions on-line for importing, and it looks pretty straightforward.

However, we are going to be using this process a lot, and I would like to know if it is possible to create and save an Import template, so we are not cosntantly having to map all the import fields every time we do an import.

If so, can someone point me in the right direction for accomplishing this?

Thanks.

FileMaker Version: 5

Platform: Windows 95/98

Link to comment
Share on other sites

Certainly, once you manually perform an import, open up ScriptMaker and create a script called Import Clients (for example). Scroll the function list on the left down to the Records section and click Import Records. Then click Specify File in the options box and navigate to where your file lives, and select it. Click Open. Select Perform without dialog from the options. Click OK.

If you ever need to modify the import order, open the script and click OK, then select the Replace radio button next to Import order.

This same procedure works for saving sorts, exports, and print setup/prints.

Link to comment
Share on other sites

  • Newbies

Thanks. I will give that a shot. One follow-up question, though. The files imported will be in the same directory, but have a different name every time (the file name is date stamped). Does ScriptMaker allow you to save the script with a "File Browse" option to select the file to import from that specific directory?

Link to comment
Share on other sites

  • 2 weeks later...
  • Newbies

Quote from Queue

Certainly, once you manually perform an import, open up ScriptMaker and create a script called Import Clients (for example). Scroll the function list on the left down to the Records section and click Import Records. Then click Specify File in the options box and navigate to where your file lives, and select it. Click Open. Select Perform without dialog from the options. Click OK.

A follow up question. Does the above mean that I need to manually import the records once before I can create/save the Import script?

Thanks.

Link to comment
Share on other sites

  • Newbies

OK, I got the script to run, but it is not working properly.

It basically has just one step, Import Records. But, there are two major problems.

First, it looks like each plan's identifying field is a numeric counter. I am not importing anything for this field. I was hoping that it would work like Access's Autonumber and automatically continue on with the number sequence. Unfortunately, it does not appear to. When I tried to import 4 new records, instead of automatically creating 4 new records, it overwrote the first 5 records (number IDs 1-5). How can I get around this?

Which leads to the second issue. It imported my data header row which names the fields into the first record (instead of ignoring it). That is why when I imported 4 records, it overwrote 5 old ones! How do I avoid this?

Please help!!!

Link to comment
Share on other sites

  • Newbies

OK, after fumbling around with it for a while, I think I figured it all out.

The reason why it overwrote records was because the Import Action was set to Update Current Records instead of Add New Records. This is readily apparent from the Import Menu, but when running it from ScriptMaker, it can be missed easily.

Regarding the Header Row, I simply removed it from my data file. It makes matching up the records a little trickier, but hopefully no one will be messing with it so once that I get it set it up the first time, there will be no need to change it.

Link to comment
Share on other sites

This topic is 6488 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
 Share

×
×
  • Create New...

Important Information

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