I have an xlsform (used in ODK collect) with a select_one field, which is populated automatically based on a choice_filter. This value has to be read_only.
I am trying to find a way to select by default the option (preselected). Is it possible?
Alternatively, I can set the read_only to "no". But this would add one extra step for the data collectors.
It should be possible using calculation but you didn't attach your form so can't be sure. Could you do that? Ideally a small form that shows your problem if the original one is big or contains private data.
Hello,
You can even do both, like for CommodityNameApples
calculation: '345' and read_only: true (or yes).
Side-note: If the user doesn't need the code, you might also use a variable of type hidden. Disadvantage, no labeling (and not in print-out and report, but in dataset & tables).
Im not totaly clear , can you help me with this xlsform (a simple example).
The objetive is select by default the option preselected using choice_filter.
How to express the calculate?. Link in ENKETO
Example xlsx:example_choice_automatic.xlsx (30.4 KB)
The example do not have all options, but in the archive that i share all codes have the same actividad(Cosecha Mecanizada). The codes are machine codes, all machine used to the same activity.
So the objetive in this example is the automatic select of options , to delete the manual select:
So after adding answer to the first question Código de equipo you want to populate the rest 5 questions with one matching option and make it selected automatically? Do I understand it correctly?
You can use calculation to select options automatically. Please take a look how I did it for your first question as a sample: example_choice_automatic (3).xlsx (12.4 KB)