Jump to content

Import NOT remembering Source table?


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

Recommended Posts

I am using FM 12 advanced

 

I have an import script that first deletes all tables and then imports tables from a previous, specified version.

 

Recently FM has decided that it will not remember the Source table for my Global table import.

 

post-72145-0-35554900-1364606778_thumb.j

 

I turn 'perform without dialog' OFF, change the Source table and everything works great.

Then I turn 'perform without dialog' ON and it goes back to it's old way of not remembering the Source table.

 

What's the 'magic' trick here?

 

Thanks

 

ron

Link to comment
Share on other sites

Thanks for the reply.

To elaborate a bit, the source Global  table has, over several versions, developed over 10,000 records.  I only need 1.  So, I can import the source 10,000 records and then delete them in the target.  That seems to work.

 

But, a better solution would be to delete all the records in the Source Global table BEFORE I import.  I have collected the user selected Source file path and filename in a variable called $$path.  Since the import module is run from the Target and I don't know what the Source might be I am looking for a 'trick' to avoid the apparent process:  open the source, goto the Global layout, delete all records, close the Source, continue the Target import script... 

 

Is there an easier way to do this?

Link to comment
Share on other sites

Another solution is to check there is only one record, then import with the option to update existing records.

I had no idea my previous import script was accumulating thousands of duplicate records. 

 

So, now the situation is I need to import a source with 10,000 duplicate global records.  Once they are imported, I can easily delete all but 1 record.  The question is "How do I delete 9,999 source records BEFORE I import them?  (Given that I do not know the import file name; only the global variable , $$path, that hold the Source path and filename.fmpr)

 

Thank you for the input

 

Ron

Link to comment
Share on other sites

hi, Ron G:

 

Why not check out the "Updating Local Files" technique from Matt Petrowsky - it has some ideas you could use to make this work.

 

Matt does point out that at least one record is required for the solution to work, so it includes "Show All", followed by "Omit Record", then "Show Omitted". He lso sets up "External Data Sources" to include the "temp" file.

 

- - Scott

Link to comment
Share on other sites

  • 6 months later...

No trick, it should just work once you set it in your script.

 

You are not really deleting tables are you?  I'm assuming you meant records...

Sorry to open it again. I have this expirience. When I set-up all the mappings it works well  until I'll close database. After reopening all mappings gets lost and I have to setup again. I've tried to "save it" in local file as well as on the remote file with same results. What I'm doing wrong?

 

Thank you

Link to comment
Share on other sites

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