flexible sync_universe in syncdata
Posted: June 30th, 2022, 2:13 pm
Hi folks,
I have a need to download some questionnaires from the server, using syncdata(get, ...), filtering the questionnaires by a filter logical expression involving some elements of the questionnaire key, instead of the contents of the key itself.
An example:
On our surveys, we have supervisors and interviewers, both identified by a unique id, such as the SSN.
On our surveys, the questionnaire key contains, besides the geographical identification, the interviewer_id, as the last part of the key, and let us name it INTER_ID.
There is a 1-n relationship between supervisors and interviewers.
In order for the supervisor to have access to the questionnaires belonging to their interviewers, we would like to use a logical expression in the syncdata filtering all the questionnaires with
INTER_ID in id_1, id_2, id_3..., idn
where id_1 would be an element of an array or a list.
Or that the sync_universe expression checked the contents of a list, similar to
b = list.seek(INTER_ID)
Best
Ari
I have a need to download some questionnaires from the server, using syncdata(get, ...), filtering the questionnaires by a filter logical expression involving some elements of the questionnaire key, instead of the contents of the key itself.
An example:
On our surveys, we have supervisors and interviewers, both identified by a unique id, such as the SSN.
On our surveys, the questionnaire key contains, besides the geographical identification, the interviewer_id, as the last part of the key, and let us name it INTER_ID.
There is a 1-n relationship between supervisors and interviewers.
In order for the supervisor to have access to the questionnaires belonging to their interviewers, we would like to use a logical expression in the syncdata filtering all the questionnaires with
INTER_ID in id_1, id_2, id_3..., idn
where id_1 would be an element of an array or a list.
Or that the sync_universe expression checked the contents of a list, similar to
b = list.seek(INTER_ID)
Best
Ari