I am building an xlsx form for ODK. I have a dropdown list and a text-input field. I would like when I select a value from the ListA, a specific code to be filled in the text-input field.
For example if I choose "valueA" from the dropdown list the value "codeA" to appear in the text-input. Currently I have an excel sheet with all the matches between the values in ListA and the corresponding codes (around 300). All the values in ListA are unique.
I was making some tests trying to use the "Calculation" field of Xls but no success till now. Has anyone done something like that with Xls? Is it possible?
You could include a
calculate
field between the dropdown list and the text-input where you pull values from acsv
file with the correspondence betweenvalueA
andcodeA
using the value selected inValueA
as a key. You can find an explanation of how thepulldata(...)
calculation works here.Here goes a brief example. In the survey tab:
In the choices tab:
And the file
data.csv
should look like this:Finally, I would advice to consider applying a cascade selection layout in
value_a
, because selecting one out of 300 values can be challenging. Another option could be sorting these choices alphabetically or in a different order, such that when someone fills-in your form she will know how to easily locate the appropriate choice.Hope this helps!