Page 1 of 1

Case Filter Handling

Posted: June 22nd, 2017, 1:22 am
by arkagwa
Dear Josh

I have managed to connect and use Dropbox sync successful. Now kindly help on how to stop interviewer to edit data which is NOT his or her. After sync all data from server are loaded into device of the interviewer

Re: Case Filter Handling

Posted: June 22nd, 2017, 7:58 am
by josh
There are three options. You could use PUT instead of BOTH as the sync direction (in sync options dialog choose "upload changes to server") in which case the interviewer will not download data from the server. That is the easiest option.

The second option is to use a universe when you sync. That lets you limit the cases that are uploaded/downloaded based on the case ids. For that you would need to use sync logic functions in a menu program so it is a bit complicated. You can look at the Synchronization from Logic example of how to use sync functions in a menu program. The help for syncdata() explains how to add a universe.

Third option is to use CaseListingFilter in your pff file to limit the cases shown to the interviewer. This still downloads everything to the tablet but only shows the interviewer those that match the filter. See "Run Production Data Entry" in the help for details on CaseListingFilter.

Re: Case Filter Handling

Posted: March 19th, 2018, 8:56 am
by kompiler
Dear josh,

Could you please give an example of using CaseListingFilter in pff file. my case id consist of district id, village id and household number. in separate item i am capturing interview id (which is not part of case id). is it possible to filter data by interviewer id? could you please provide a regular expression that would filter data by district (case id = district id (len=1) + village id (len=2) + household number (len=3), all data types are number) .

Regards,
Komil

Re: Case Filter Handling

Posted: March 19th, 2018, 7:40 pm
by josh
You can only use id-items in the case listing filter so you can't use the interview id variable in it.

If you want to filter based on the id-items you would set the case listing filter to the concatenation of the id's you want to show. For example if you want to only show district=1, village=22, household number=333 then you would use:

CaseListingFilter=122333

If instead you wanted to show all households in district=1, village=22 then you could use:

CaseListingFilter=122.*

Re: Case Filter Handling

Posted: March 19th, 2018, 11:43 pm
by kompiler
Dear josh,

Thank you so much for clarification.