Oops, I forgot one annoying part of this. pyxform
, the tool that converts forms from XLSForm to XForms, doesn't have explicit support for this kind of lookup. Right now it sees your simple list of choices and builds the choice list internally to the form rather than in a separate instance. You have to force the creation of the instance by having a choice filter on that choice list somewhere in your form.
The trick I usually use is have a question that just has explanation text or a summary but that actually is a select_one
with a filter that leaves no choices. See the form I linked to for an example. You can always put that in a field-list
so it's in the same screen as another question.
In your case, you'd have something like
type name label choice_filter
select_one lst_immat explanation Some text here name = 'fake'
Two issues are open that relate to making this kind of thing easier: https://github.com/XLSForm/pyxform/issues/203 and https://github.com/XLSForm/pyxform/issues/176