Jump to content

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

Recommended Posts

  • Newbies
Posted

Hi all,

Hope you might shed some light on this issue. I am writing a script to sync information between Filemaker Pro & Go, but the record import process is behaving strangely.

Basically, for each table I want to synchronise, I have a batch of 4 scripts. This consists of 3 "doing" scripts, and one "controller" script. The controller script simply performs the 3 "doing" scripts, in order.

I have 6 tables. Each has its own set of 4 sync scripts, which are mostly identical, except of course to reference the table I'm syncing at the time.

***********

Now, obviously I want a nice big "Sync Now" button. This button performs one more script, which runs my 6 "controller" scripts in order. Thus, "Sync Now" should synchronise all 6 of my tables.

Here's the weird bit. If I run the "controller" script manually for any given table, the table syncs perfectly. However, if I run all 6 "controller" scripts one after the other, using my "Sync Now" script, I get weird behaviour.

Specifically, my iPad manages to update the master database with its changes (step 3 below), but fails to subsequently purge and reimport the freshly updated information from the master (step 4).

I put in some deliberate pauses into the script so I could monitor the progress. The iPad does appear to reimport the data from master, but once the complete Sync Now script has run, the imported data is no longer in the table. It just disappears.

I would normally assume that another of my scripts was giving a "Delete All" command, but it can't be, since the same would happen if/when I run the script manually on its own.

I hope this makes sense! Any input appreciated. Is there a fundamental problem with using scripts to run scripts to run scripts etc?

Thanks everyone.

The scripting process is as follows:

*****************

1 - For a given table on the iPad, compare records against the equivalent table in the master database on FM Pro

2 - Delete records from the iPad which haven't changed, based on a modification date and unique ID

3 - Upload all new and updated records to the master database

4 - Once the upload is complete, purge the iPad table and import a fresh set of records from the master

*****************

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