Autocomplete State

Is it possible to Autocomplete a state when selecting from City Choices?

Homework question :wink: - If you have a look at the XLSForm specs, are there any functions that look useful?

I have solved a similar problem by doing the matching downstream, i.e. after exporting the submissions from ODK Aggregate/Central into our own data warehouse. In my case, I didn't need the equivalent of "state" once I knew my equivalent of the "city", as I could infer that later on. This will of course not tell me the "state" while still in the form - is that a requirement for your workflow?

Yes I was thinking that this could’ve been done downstream but was wanting to know if this can be done within the form, I’m building the form via xls. So far my train of thought is using a calculate field and output the state as a note field; but I believe that’s may be a little bit too long

The easiest thing to do is to cascade from states to cities as described at

If you have the states and cities in an external CSV, you can also do a lookup of a city given a state. This assumes you have unique states.

You can see examples of lookups in this person lookup I built.

person_lookup.xlsx (11.0 KB)
persons.csv (3.1 KB)

1 Like

Thank You, will try this now and see how it will go.