Filtering records to upload

Help, Tips, and Tricks for deploying GoZync: our "sync" engine for FileMaker Go.
Posts: 18
Joined: Tue Sep 29, 2009 9:25 am
PostPosted: Thu Feb 28, 2013 11:45 am
Hi,
is there a built-in method like your Send Filters to Pull for limiting the record set on certain tables? Obviously, it's easy to limit Zync It - This Record ( RecordID ), but it would be convenient to be able to Zync it - This File but limit the records in some tables.

Thanks,
-jb
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Thu Feb 28, 2013 1:44 pm
Hi Jonathan,

Yes there is for pulling. The "Filter Records to Zync" script can have a branch for each table (we have a couple example branches in there). So you can code a find request for each table that may or may not use some of the filter criteria pushed up in "Send Filters to Pull".

(Thanks for catching the missing $ in our example, by the way. Will be releasing a new v of 3.171 with that fixed.)

If you're talking about the push up from mobile, we don't have any found set criteria on that except the "...this File", "...this Table", and "...this Record" scripts you already know about. All of those then look to see if the record has been modified since the last sync.

HTH
John Sindelar
SeedCode
Posts: 18
Joined: Tue Sep 29, 2009 9:25 am
PostPosted: Thu Feb 28, 2013 2:51 pm
Thanks, John. Your filter feature for the Pull works great, and is implemented. In this case, the client only wants to push records in a particular table when the user sets a status field to a particular value. I wonder if it would be possible to add a filter sub-script to the script that limits the push to changed records, to further limit the record set? I haven't yet identified which script limits the push to changed records. :)
SeedCode Staff
SeedCode Staff
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am
PostPosted: Thu Feb 28, 2013 4:05 pm
All things are possible Jonathan--it's FileMaker and it's editable. The script is "Push One TO ( TOName | RecordID)". We use a custom function to find all the IDs that should be sent and then loop through them. Either edit the custom function or add a test within the loop to see if you *really do* want to send a record.

If you need help modifying either, purchase an implementation package and we'll be able to work on this with you after Pause.

One bit of caution. Intentionally keeping modified but unsynced records on your device is fine (see our post on the Urgency of Mobile Work) but you want to make sure your users have a way to sync those records (such as before they download a new version of your app). So a sync all changed records option should still be there for your users.
John Sindelar
SeedCode

Return to GoZync

Who is online

Users browsing this forum: No registered users and 2 guests

(855) SEEDCODE
[email protected]
Follow us: