# Handballing awareness grid

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"

Regards & Thanks

Musa Karim

Awareness_Grid.xlsx (9.32 KB)

The value of \${A2} would be the space-separated list of values chosen by
the user.

restrict the set of choices in Total based upon the selections in A2.

If that does not meet your needs, you can theoretically construct a
constraint with selected(...) and these two other functions:

selected-at(\${A2},1) -- retrieves the first of the choices the user
selected in A2.
count-selected(\${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},selected-at(\${A3},0)) is true,
and if the user selected 2 or more choices in A3, test this:
selected(\${A2},selected-at(\${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"

Regards & Thanks

Musa Karim

## --

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