Geotrace with dynamic default response

Dear all,

I’m new to both KoBoToolbox and XLSForms, so apologies if what I’m about to ask is considered basic knowledge.

For my survey I need respondents to draw a line on a map using the geotrace function. Different users will need to start their geotrace lines from a limited number of possible starting points (in my case: a set of train stations on a network).

To simplify analysis, I’d would like standardise the starting point by pre-drawing this first point on the map. This can be achieved by entering the GPS coordinates in the default response-field. However, as different users will need different starting points, I would like respondents to first select their starting point in a ‘select one’ question and then set the coordinates related to this answer as the default response value on their geotrace map.

The way I see this now, I would firstly need to translate the (textual) answer in the ‘select one’ question to a (numerical) GPS coordinate, and secondly feed these coordinates into the default response field of the ‘geotrace’ question.

Is this possible? If so, I would very much appreciate your thoughts on how to achieve this effect.

Welcome to the community, @JohanKlaasK! I don’t know if it helps but we have a post discussed previously which should help you upload a predefined GPS location:

Thank you for your quick response.

I’ve read that post, and indeed it taught me how to add a point to a geotrace map. However, what I’m still struggling with is how to make this point dynamic, i.e.: that the point which is displayed can vary depending on the answer which a respondent has previously given to a ‘select one’-question.

Welcome,
As far as I know a default can also be dynamic. Or you could use a calculation with once(…).
I am not sure if you can use an if(… expression) as default, but at least you could create a calculate type and reference it in the default.

To specify the related GPS you could use an external csv table (with pulldata or select from file) or work with an item label of a choice list, both filtered by your starting point info.

How many select_one choices do you need to treat? Do they always map 1 : 1 to a GPS point? Does your mapping change or develop in time?

1 Like