[ODK Community] new to all this and having problems with everything LOL

If you are using multi-selects, you should use the selected(/my/form/question,
'value')
construct to test if the 'value' was one of the choices in the
multi-select.

See: http://opendatakit.org/help/form-design/binding/

Note that this is the XML syntax. In XLSForm, you would use *
selected(${q9},'value')*

Mitch

··· On Thu, Oct 18, 2012 at 8:09 AM, sparks wrote:

We are testing putting surveys on mobile devices and we tried koboforms
first.
The main problems we were having is with multi select variables.
The question text and hint change to undefined and I don't understand why.
once we get a form build and change the undefined entries back to their
values another multi select will loose it and go undefined.
IF we manage to get the form build and saved it all looks fine and loads
on the device then on the multi selections if the first one turns on
or enables the following question it works, but if another selection in
this question is selected the following question is turned back to the
hidden state.

thinking it was a kobo form problem we changed over to purcforms and tried
it.
the interface produced a product with no changes make to the multi selects
to undefined and the output looked better but again the multi select
answers looked great
in their test window turning on and off the correct follow questions.
We put it on an android device using odk and click 1 turns on q9, check 1
and 2 and q9 disappears.
an example of this is

crops = asp enable q9
works but it they also check corn in the crops question q9 disappears.

The only thing I could think of was if asp is true and all other were
false type of situation.

What are we doing wrong and is this something that others have seen.
Very new and very confused.
reminds me of the time 15 years ago when I first tried Access :slight_smile:

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

but why does it activate Q9 when I select asp but if I then select corn it
turns it back off.
It is only activating the response question when the correct value is
selected and NO other selections are being made?
Q8
asp
beet
wheat
corn
I select asp and Q9 is displayed.
If I select wheat that will enable Q10 neither is displayed.
We even took out all other questions and still if asp is selected Q9 is
displayed, pick second selection such as beet etc so you pick asp and beet
and Q9 is again turned off.
So it will only display Q9 if asp is the only selection.

The multi-select questions store values as a space-separated string (as per
the XForms standard).

So if you check "corn" and "oats" then the multi-select will have a value
of "corn oats" and your test for relevant="/myform/q9 = 'corn'" will fail.
You need to change that to relevant="selected(/myform/q9,'corn')" and it
will work correctly.

Note that because of the space-separation issue, you need to ensure that
the 'value' of each of your select choices does not contain a space.

Mitch

··· On Thu, Oct 18, 2012 at 11:05 AM, sparks wrote:

but why does it activate Q9 when I select asp but if I then select corn it
turns it back off.
It is only activating the response question when the correct value is
selected and NO other selections are being made?
Q8
asp
beet
wheat
corn
I select asp and Q9 is displayed.
If I select wheat that will enable Q10 neither is displayed.
We even took out all other questions and still if asp is selected Q9 is
displayed, pick second selection such as beet etc so you pick asp and beet
and Q9 is again turned off.
So it will only display Q9 if asp is the only selection.

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com