Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

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

Posted

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.

Posted

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

Posted

Enter Find Mode []

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

Perform Find []

If [ Get( FoundCount ) > 0 ]

End If

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