Jump to content

Import order across multiple files


anewby
 Share

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

Recommended Posts

Hi,

I have five .fm databases that I am importing into another database as part of my application.

Currently, I have them set up nicely to import without duplication, yadda yadda...

However, one of the four databases presents a slightly different import order. i.e.

In the four that import correctly, field order in the import dialogue is:

...

Display (imported) -> Display

ID (not imported)

IDX (imported) -> IDX

Type (imported) -> Type

In the misbehaving database, import order is, so what happens is:

...

Display (imported) -> Display

Type (should be imported)

ID (shouldn't be imported) -> IDX

IDX (imported) -> Type

With the result that when my scripts are set to the import order of the first things are mostly okay, but the misbehaving database doesn't import correctly, and if I set the scripts to the import order of the bad one then it's terrible.

How might I be able to align the fields in the import dialogue of the bad database with the other four? Thanks in advance.

Version: v6.x

Platform: Mac OS X Jaguar

Link to comment
Share on other sites

It looks like you'll have to define a separate import script for the bad database. Do the import & field mapping correctly manually, then make a one-line script called importB or something. You could also make a one-line import script for the four good ones, call it importA.

In your primary script, set up a conditionsl that tests, somehow, which database is being imported, and do this:

If (BadDatabaseBeingImported)

Perform Script (ImportB)

Else

Perform Script (ImportA)

EndIf

Steve Brown

Link to comment
Share on other sites

I have done this. I manually created an import script for each database. The problem is that when I change one of the scripts, they all change.

My thought at this point is to clone one of the good ones, and import the data from the bad one into it. It appers to have something to do with the field creation order.

Link to comment
Share on other sites

If something goes wrong, then the import will default back to creation order. This will also happen if you add or delete fields from one of the files.

Did you remember to check the "restore import order" box in the Import step in the script?

Link to comment
Share on other sites

This topic is 6502 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.