Filtering the CSV media file records for a field worker code

1. What is the issue? Please be detailed.
I have a survey rolled out for a large number of interviewers and the XLS form structure uses pulldata. Is there a way to have the CSV media fetched in the mobile gadgets filtered based on the field worker getting the blank form. Notably, the CSV uploaded at the server has a column named interviewer that we can use for the filter.

2. What steps can we take to reproduce this issue?

3. What have you tried to fix the issue?

4. Upload any test forms or screenshots below.

Hi Francis,

Yes there are several ways to do this depending on your goal and assuming that the enumerator selects their own name from a select_one question near the start of the form. "Pulldata()" will return one result based on a match with an enumerator column. "Choice_filter" will create a list of options for a question based on the enumerator. There are other options like the "search()" function and Xpaths which have a lot more flexibility in their output. If you want to share more about the form design you are planning it should be possible to direct you to the right function.

Hello @Noel thanks for the swift response. Notably, choice filter and search works on the mobile gadget. My scenario is somewhat different; if a field worker needs to do say10 interviews out of the 3000 on the CSV media file in the server (with a fieldworker code as one of the variables), is there a means to ensure that only 10 records matching the fieldworker code get downloaded when fetching a new blank form.

hi @Francis_Opiyo - there is yes. The form would download all 3000 interviews but only the 10 relevant to the interview would ever be displayed. It depends whether each submission should contain 1 interview or 10 and whether each interview is unique to one interviewer.

I am not sure if you are able to share a part of your form or not? Of course it would be necessary to replace real people's names with fake ones before sharing.

If each submission is one interview then usually the interviewer would get a question asking him/her to select one of their 10 interviews from a list and then subsequent questions would pull information about this one interview from the external sheet.

If you need to have multiple interviews in a single submission then possibly a more complicated repeat_group system is needed.