Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Import NOT remembering Source table?

Featured Replies

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

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...

  • Author

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?

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

  • Author

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

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

  • 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

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.