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

avoiding importing duplicates?

Featured Replies

Is there a way to have FM import new records only if the record does not exist in the target file? (my source file is a .csv)

Platform: Windows XP

You might try importing to an intermediary database, relate it to your main database, and set up a calc field checkbox that is a "one" if it finds a matching record across the relationship, and "zero" if not.

Run a find on this checkbox for a "one" and omit. Your found set is all records not duplicated in the main db. Go to main db & import.

This entire process, starting from the .csv file, could be scripted to a single button to click.

Steve Brown

2nd DB is not needed....on import through ODBC/DSN (setup to point to your CSV file) then filter that file by SQL:

SELECT DISTINCT (field1), field2,field3 WHERE field1="someting".....

depents on which field/column is the duplicate...they key is using DISTINCT statement.

http://www.w3schools.com/sql/sql_select.asp

All the best!

  • Author

Thanks spb. That works fine. I'm curious, how do you get all this to happen with a single click, when the script needs to access a different file?

Thanks Leb i Sol, all that is new to me and interesting - I'll do some learning.

Set up a script in the intermediary database that will show all records, delete all records, then import the .csv. Include a Perform find script step on the checkbox as per discussion.

If set up correctly, this script ("ImportNew" will leave you with a found set in the intermediary that you want. Now set up a simple import script (one step) in your primary database that imports from the intermediary ("ImportIntermediary")

Now make a master script in the primary database that looks like:

Perform Script [sub-scripts, External: "Intermediary.fp5 (*)"]

Perform Script [sub-scripts, "ImportIntermediary"]

Add whatever bells & whistles you need, sorts, go to layout, etc. Attach this script to a button in your primary database, click it, and the effect will be that the primary is suddenly bigger by x number of new records. As long as your initial .csv file always has the same name and is always found in the same place, it should work painlessly.

Steve Brown

  • Author

Excellent. Perform external script - a fantastic discovery.

Thanks Steve!

Hi Glen!

Should you need some samples on ODBC/SQL approach let me know maybe I can make a little sample/tutorial......can't know too many ways to do the same thing wink.gifGood luck!

  • Author

Thanks Leb - very kind. I'll muddle around and call for help if stuck.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.