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.

synching two exact files with two tables

Featured Replies

Greetings,

This is FM 9 for Macintosh. I am new to FileMaker.

I am trying to synch two exact files with each other. File 1 is always open on FM server and want to synch it with file 1 as needed with a button/script.

The database has two tables: Master Database, secondly, Contact Names. In Master Database layout I view the Contact Names using a portal.

The scenario is that File 1 and File 2 have new name, fax number, so forth. And when user opens file 2 (file 1 is always open on the server), they want to click on a button (scripted) to synch file 1 with file 2.

As I'm a basic developer, I thought it best to enclose the two files. In account name enter "supersmile". I would prefer for someone to just do the scripts in the databases then to go back and forth via this post.

Thank you very much for your help.

Thanks,

Denis

408-489-0970

Archive.zip

Database synchronisation is not simple.

You're going to have to come up with some basic rules to decide what happens with the synching process. For instance, what happens if File 2 has a record updated, but it deleted in File 1?

What happens if the same record is updated in both files, which one takes precedence?

If you don't already have them you'll need to track record modification dates and times (or timestamps) so you can work out when each record was last updated. Note carefully, however, that if you have processes that update records frequently (say, marking records that are in found sets, or that have been printed etc) then this could confuse the situation. Hopefully you don't have any such processes.

Once you've worked out the rules, working out the programming to make it happen is relatively straight forward. The import matching records feature can make this simple.

I would prefer for someone to just do the scripts in the databases then to go back and forth via this post.

The forum has a section for services wanted, you might want to post a request in there.

  • Author

Greetings,

Thanks to your direction of using the Timestamp field, I am now able to find all records that were modified. I created a Timestamp field and selected Modification checkbox of time and date. Using this field I can do a find using the < symbol and inserting current time from the Insert menu. Manually this works perfect. Now I'm stuck on the next step of automating the find. I'm not sure how to automate the enter find mode, got to timestamp field, insert < symbol and insert time... Can someone help me script this using the Timestamp field? Once I script this, I can have file 2 do an import which I can script.

Thanks...Denis

Enter Find Mode []

Set Field [ timestamp ; "<" & Timestamp) date ; time ) ]

Perform Find []

If [ Get( FoundCount ) > 0 ]

End If

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.