1. What is the issue? Please be detailed.
I am collecting gps during enumeration that I plan to use in a follow-up survey. The gps from the enumeration is saved to an entity file. In the baseline, i want data collectors to be able to select points/households from a map based on the enumeration data. This was made possible through the entity functionality. But since the number of points can become very large, I want to be able to filter the options so data collectors don't get overwhelmed.
My thought is to filter the maps based on the household_id in the previous question.
Any idea how this could be implemented?
2. What steps can we take to reproduce this issue?
I have attached the sample form
3. What have you tried to fix the issue?
using choice_filter.
4. Upload any forms or screenshots you can share publicly below.
Many thanks for your response but this is still unclear to me.
I am generally familiar with applying choice filters when the options are in the choices tab. In my case, the geopoints are from an entity list that I am not sure how to access.
Everything you know about choice filters on lists from the choices tab applies to entity lists! The same way that you can use the name of a column from the choices tab (without quotes or ${}, just the name) to define what property of the choice to filter on, you can use an entity property name. That's the household_id side in the expression that @mathieubossaert wrote out.
Did you try the expression? What didn't work as expected?
One thing I don't understand from your description is that it seems to me like there would always be a single point/household location per household_id, is that correct? In that case, do you really need the data collector to select it or could you use a calculate to look it up? You could also do things like add a assigned_to property that represents a data collector id, have a question that asks for data collector id, and filter based on that. You could do the same concept by region.
In @Super_Kay's scenario as I understand it, that extra part of the expression should not be necessary. It's useful in the tutorial because the first part of the filter is based on a property that changes. The server always uses the latest entity list when you open up a submission. So let's say you open up a submission that addressed problem1, that same problem would have a status of addressed in the server entity list and therefore it would be filtered out by the expression. Adding name=current()/. means that the selected entity stays selected no matter what.
Welcome to the ODK community, @Super_Kay. Consider introducing yourself when you have a moment so we can learn more about the work you do!
Another option for me is to collect GPS at the start of the follow-uo form such that it is constrained by the original geopoint data collected in the enumeration. In other words, data collectors should be warned if the location from whoch they are trying to collect geopoint is more than 10 meters from the original location. The idea is to ensure that enumerators revisit and collect data from the right household.
You need to first calculate the household_id of the first selected entity.
Household_id is not the internal ID of the baseline entities;-), just one property.
Check this working xlsx : baseline_template.xlsx (16,9 Ko)