Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing records...?

Status
Not open for further replies.

adamsoderqvist

Programmer
Sep 8, 2001
136
SE
Hi, I have a tricky one...

Lets say I wanna import records from one FM database to another. This is done by using the "Import records"-script step (i.e.: automatically).

Earlier, I have specified the import order by mapping it, so that the correct data is imported into the correct fields in the recieving DB.

It's a long story, but to make it a short one: when the import script runs, the import order SOMETIMES is messed up, and sometimes it's not.

My Q is:
is there a way to "hard code" the import order i FM, so that I don't have to rely on the predefined one in FM? -Sort of "physically" define the import order...

Thanx,

Adam
 
No, there is not any way to "hard code" import order (and many other things, which drives me crazy sometimes :)

The only way you can go is to manually import some data (and define the import order, of course). Then go to the Scriptmaker, open the script with Import records script step and click "OK" immediately. Dialog box opens, then select "Replace" option on the Import order line.

This is the only way how to store import order in script. I'm sure, you know this. I have wanted to confirm you have nothing else to do about it.

Karel
 
Adam,
You are doing something funny. I have some major applications involving imports and the only thing that hasn't given me grief is the import.
Suggestion -
1. Re-do the import as described by Karel.
2. Fix the script ditto
3. Print the script and ensure it shows the order you require.

Are you, or anyone else, messing about with the field definitions in either DB? FMP cannot cope with changes in the order or number of fields.



Cheers,
Paul J.
 
Hi

yes, I know that messing with the fields are a no-no...

OK, I have done as you suggested. the only problem is that I have done so several times, and it seems to be working for a while, but then doesn't all of a sudden... Could be due to the fact that each night an "update" db is imorted into the db with new records, that are to be put into the database! (Using a different imoprt order).

I realise that there isn't much to be done. Thanx y'all!

//Adam
 
Adam,
Thanks. You make me feel much better about my wasted half day, today. (You do not want to know - trust me!)
Is there any chance someone else is looking at, or playing with, your script and answering 'replace' to the question on import order? Clutching at straws but ...

Know any elves?




Cheers,
Paul J.
 
Okay, this may be an extra-stupid question, but...

Assuming that both imports are parts of scripts, is it possible that somewhere along the line it's restoring the wrong import order? for example--is it possible that when you replaced, you replaced with the import order for the overnight import rather than the import order you THOUGHT you were using? Or is there perhaps a script step that restores the import order at the wrong point?

(I'm a comparative neophyte, so I understand the frustration of shifting import orders--when, oh WHEN is FileMaker going to change their wonderful program so that even if you add or change field defs, it still remembers its import orders? I think that's my idea of heaven.)

Anyway, just a thought.
--Regina
 
That's not a bad assumption (about the restoring the wrong script). But no: when I do the restore command I make sure that I'm doning from the accurate script, so that the order is saved for the specific script...

/A
 
Adam,
Still clutching at straws. This is probably not relevant but if you believe in miracles and fairies .... (and you have to in this game!)
I have an application where we export from FMP to a tab-delimited file (.TAB) which is then imported to another application.
We had a weird problem with the .TAB file a while back. One of our employees had found a way to put a tab into a text field. The effect was to lose the field containing
the tab on the final import. The application is a bit of a dog and does some odd things with imports and exports.
I wonder how FMP handles fields with tabs in them?
Cheers,
Paul J.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top