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.

Script to import new records

Featured Replies

  • Newbies

Using FMP 18 on iMac. I'm wanting to create a script to import only new records from one file to another. When I go through the import steps in my script it doesn't give me the option to add new or update, it just goes to the part for import order and wants to import all the records. If someone could tell me what I'm doing wrong here. . . .

What determines if a record is "new"?

On a broader scale, why do you need to do this at all? it seems very cumbersome to keep two files and constantly update  one to match the other.

 

 

Edited by comment

  • Author
  • Newbies

I download info from the web. It downloads everything and I want to just import the new stuff to my database. 

Why do you make me repeat my question?

1 hour ago, comment said:

What determines if a record is "new"?

 

  • Author
  • Newbies

So very sorry.

I have a database with two layouts that have the same fields but are set up differently. When I add to one, I thought it would be easier to do a script to update the other layout rather than put it in both manually every time. So I want to add new records or update or whatever so I don't have duplicate records in one of the layouts.

Wordy but hopefully it explains what I'm trying to do.

1 minute ago, smrat said:

hopefully it explains what I'm trying to do.

I am afraid not. You speak of duplicate records, but you're not saying what constitutes a duplicate. Do these records have some sort of unique ID?

 

  • Author
  • Newbies

They have a unique ID. Probably (or maybe) I'm using the wrong word here. They are two databases with the same fields only arranged differently with different formats. So I want to import only the new records created in one database to the other database.

If the records have a unique ID, you can validate the unique iD field in the target table as 'Unique, Validate always'. This will prevent records with existing ID values from being imported.

 

  • Author
  • Newbies

That did it. Thank you for your help and your patience.

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.