guy@guym.com

Simple SYNC method

Discussion created by guy@guym.com on Dec 7, 2012

Tired of all the attempts with relationships and 3 files and all the neat ways to sync remote users with the master DB. I had it working but structural changes didn't move as cleanlly as I'd like, SO, deveised a simple brute force method for syncing remote GO files with a Master DB.

 

Create a simple DB for the modified records. One layout, no formatting, jsut one table for each Master Table

 

It resides on HOST

 

Remote file has sctript that for each table:

1) Decides which records need to be synced based on mod date, new, etc.

2) Opens transfer file (e.g. Sync.fmp12) <Open URL fmp://22.222.222.222/Sync.fmp12>

3) Populates field (Remote _z_Transfer) that contains all the data for all fields for any modified record (see below)

4) Copies field

5) Select window for Sync file

6) Paste into (Master _z_Transfer)

7) Parse Master _z_Transfer into sepatate fields as required

8) Loop for each Remote record

9) Close Transfer (Sync,fmp12

10) On Close, Sync.fmp12 runs script on Master that imports Sync into Master file and uses business rules to update records

11) Create log entries, validations, etc.

voila

 

My GO App also captures photos and voice narration, so must also loop and copy-paste these into Transfer file (Sync.fmp12)

 

Note: Move each window off screen to eliminate flickering.

 

*Basic script:
Set Field: _z_Transfer

 

Location::Date & ¶ &

Location::Time of Day & ¶ &

Location::Description & ¶ &

Location::Address & ¶ &

Location::City & ¶ &

Location::ST & ¶ &

Location::ZIP & ¶ &

Location::Latitude & ¶ &

Location::Longitude & ¶ &

$$me & ¶ &

$$User & ¶ &

$$Device & ¶ &

$$Path

 

etc.

 

While not as elegant as relationship table and TO Magic, it took 10 minutes and works like a champ, Can also use to send work orders and changes to Remote.

 

Since a simple DB is all that is being used, even 3G is fast enough (except in the case of photos and voice overs).

 

Whadda ya think.

 

Captain Guy

Outcomes