Page 1 of 1

Filtered syncs

Posted: January 29th, 2018, 11:43 am
by AriSilva
Hi folks,
Sync files with get and put AND where logic_expression.
This would allow to upload and/or download selected records.
For example, get a sample_dict file for a specific interviewer downloading just the data from the census tracks s/he will be working with.
Or, suppose the interviewer lost his/her phone, and we want to download back to him the records he already processed, in order for him to continue his (tired of that politically correct he/she) work.
Best
Ari

Re: Filtered syncs

Posted: January 29th, 2018, 11:58 am
by josh
This is partially supported now. You can pass a universe to syncdata() which is matched against the id-items of the cases to be synced. For example if you do syncdata(GET, MYDICT, "01") will only get cases where the case id starts with "01". So, for example, if your first id-item is a 2 digit code for province, then you will only sync cases in province 01. This isn't as flexible as a where clause that lets you use any variables in the case but it works for cases where the cases you want to sync are based on a hierarchical id scheme like you often have in geographical codes.

Re: Filtered syncs

Posted: February 1st, 2018, 6:22 am
by AriSilva
Thanks, Josh.
That is good enough, at least for my purposes. It is exactly what I was thinking of.
My fault, I did not do my homework and study the sync functions.
Best
Ari