Hi
I am looking for the option to control awareness grid, attached is the
sample form I designed
Problem
TOM(A1) a single response question. Let say I chose option a
Spont(A2) a multiple response question but response on TOM must be there in
Spont. I put constraint as (selected(.,${A1})) it works fine. Let say I
chose option a, b, d, and h
Total (A2) a multiple response question but response on Spont must be there
in Total. I put constraint as (selected(.,${A2})). It is not working
properly.

Let say I chose a, b, d, h and g ==> it works

Let say I chose a,b,c,d,h ==> this will not work, as "c" comes in
between "b" and "d"
Is there any solution to this problem, Please Help
Regards & Thanks
Musa Karim
Awareness_Grid.xlsx (9.32 KB)
The value of ${A2} would be the spaceseparated list of values chosen by
the user.
You are asking for the Cascading Selection functionality, where you
restrict the set of choices in Total based upon the selections in A2.
See http://opendatakit.org/help/formdesign/cascadingselects/
If that does not meet your needs, you can theoretically construct a
constraint with selected(...) and these two other functions:
selectedat(${A2},1)  retrieves the first of the choices the user
selected in A2.
countselected(${A2})  returns the number of choices the user selected in
A2
I.e., test if A3 has no more than the number of choices the user selected
in A2.
then if the user selected 1 or more choices in A3, test that:
selected(${A2},selectedat(${A3},0)) is true,
and if the user selected 2 or more choices in A3, test this:
selected(${A2},selectedat(${A3},1)) is true,
etc.
But, again, the cascading selects are what you need.
···
On Thu, Feb 6, 2014 at 6:52 AM, Musa Karim wrote:
Hi
I am looking for the option to control awareness grid, attached is the
sample form I designed
Problem
TOM(A1) a single response question. Let say I chose option a
Spont(A2) a multiple response question but response on TOM must be there
in Spont. I put constraint as (selected(.,${A1})) it works fine. Let
say I chose option a, b, d, and h
Total (A2) a multiple response question but response on Spont must be
there in Total. I put constraint as *(selected(.,${A2})). *It is not
working properly.
· Let say I chose a, b, d, h and g è it works
· Let say I chose a,b,c,d,h è this will not work, as "c" comes in
between "b" and "d"
Is there any solution to this problem, Please Help
Regards & Thanks
Musa Karim

Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en
You received this message because you are subscribed to the Google Groups
"ODK Community" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

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