[ODK Developers] Branching/ Choose one

Is this a multiple select you are talking about?
If so, you my have to do a string search if that is possible. all the
selected options are stored as one variable in the xml.
if this is a single select then something like ${car} = "1" should work,
given Yes = 1 in the choices tab of the xls file.
Does this answer your question?

Brian

··· On Wed, Mar 6, 2013 at 6:31 AM, wrote:

Hello,

How do i branch from a choose one?
i know i can branch from a text field by adding in relevance
"data/car='yes'"
but wht if i want to do the same thing from a choose one through the ref
number?

Thanks,
Salma

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Salma,

You can use something like: selected(${favoriteColor}, 'red'). You can
also negate it: not(selected(${favoriteColor}, 'red')) or combine it
with others: selected(${favoriteColor}, 'red') or
selected(${favoriteColor}, 'yellow').

Yaw

··· -- Need ODK help? Go to http://nafundi.com for custom development, form design, implementation support, and user training for ODK.

On Wed, Mar 6, 2013 at 10:19 AM, Brian Dyer bdye87@gmail.com wrote:

Is this a multiple select you are talking about?
If so, you my have to do a string search if that is possible. all the
selected options are stored as one variable in the xml.
if this is a single select then something like ${car} = "1" should work,
given Yes = 1 in the choices tab of the xls file.
Does this answer your question?

Brian

On Wed, Mar 6, 2013 at 6:31 AM, salmah.mohsen@gmail.com wrote:

Hello,

How do i branch from a choose one?
i know i can branch from a text field by adding in relevance
"data/car='yes'"
but wht if i want to do the same thing from a choose one through the ref
number?

Thanks,
Salma

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups
"ODK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

1 Like