Binding and multiple select/select one

Dear Sir,

I have been trying to solve this problem for the last two days, and can't
find the answer online (ODK Binding, formhub, google groups).

I am trying to skip, when the surveyor has ticked two questions in a
multiple select. As well as in a select one (bellow) and the surveyor has
selected two out of five questions, which skips the next question. I have
bellow inserted the survey and choices. I have tried both to use the binding
and, and (not(selected(${charcoal_time}, 'option1', 'option2' )), but none
of them have worked. I really appreciate any assistance in this matter.

Best,

Sam

Survey

type

name

label

hint

relevant

select one from place

place_cook

  1. Where do you usually cook?

select one from yes_no

ventilation

  1. Does the area where you cook have a window/opening for ventilation?

not(selected(${place_cook}, 'outdoors_walls', 'outdoors_no_walls' ))

select one from charcoal_length

charcoal_time

17a. How long have you been using charcoal for cooking in your household?

Choice

List name

Name

label

place

main_partition

In the main building used for living or sleeping (with partition)

place

main_no_partition

In the main building used for living or sleeping (without partition)

place

separate_room

In a separate room used as kitchen

place

separate_building

In a separate building used as kitchen

place

outdoors_walls

Outdoors (with one or two makeshift walls and roof)

place

outdoors_no_walls

Outdoors (open air with no walls)

place

other

Other

··· ****

Sam Eyde

Shared Value Africa

mailto:sam.eyde@sharedvalueafrica.com sam.eyde@sharedvalueafrica.com

South Africa:+27 792 512 547

Zambia: +260 97 100 3288

Skype: sam.eyde

http://www.sharedvalueafrica.com/ www.sharedvalueafrica.com

Sam,

selected only takes two inputs -- the node and the value. You'll have to do
something like this:
not(selected(${place_cook}, 'outdoors_walls')) and
not(selected(${place_cook}, 'outdoors_no_walls'))

Also, make sure you are putting the above in the relevance not in the hint
column.

Yaw

··· -- Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

On Mon, Jun 16, 2014 at 2:23 AM, Sam Eyde sam.eyde@sharedvalueafrica.com wrote:

Dear Sir,

I have been trying to solve this problem for the last two days, and can’t
find the answer online (ODK Binding, formhub, google groups).

I am trying to skip, when the surveyor has ticked two questions in a multiple
select
. As well as in a select one (bellow) and the surveyor has
selected two out of five questions, which skips the next question. I have
bellow inserted the survey and choices. I have tried both to use the
binding *and, *and (not(selected(${charcoal_time}, 'option1', 'option2'
)), but none of them have worked. I really appreciate any assistance in
this matter.

Best,

Sam

Survey

type

name

label

hint

relevant

select one from place

place_cook

  1. Where do you usually cook?

select one from yes_no

ventilation

  1. Does the area where you cook have a window/opening for ventilation?

not(selected(${place_cook}, 'outdoors_walls', 'outdoors_no_walls' ))

select one from charcoal_length

charcoal_time

17a. How long have you been using charcoal for cooking in your household?

Choice

List name

Name

label

place

main_partition

In the main building used for living or sleeping (with partition)

place

main_no_partition

In the main building used for living or sleeping (without partition)

place

separate_room

In a separate room used as kitchen

place

separate_building

In a separate building used as kitchen

place

outdoors_walls

Outdoors (with one or two makeshift walls and roof)

place

outdoors_no_walls

Outdoors (open air with no walls)

place

other

Other


Sam Eyde

Shared Value Africa

sam.eyde@sharedvalueafrica.com

South Africa:+27 792 512 547

Zambia: +260 97 100 3288

Skype: sam.eyde

www.sharedvalueafrica.com

--

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/d/optout.

Sam,

selected only takes two inputs -- the node and the value. You'll have to do something like this:
not(selected(${place_cook}, 'outdoors_walls')) and not(selected(${place_cook}, 'outdoors_no_walls'))

Also, make sure you are putting the above in the relevance not in the hint column.

Yaw

--
Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK.

Dear Sir,
I have been trying to solve this problem for the last two days, and can’t find the answer online (ODK Binding, formhub, google groups).

I am trying to skip, when the surveyor has ticked two questions in a multiple select. As well as in a select one (bellow) and the surveyor has selected two out of five questions, which skips the next question. I have bellow inserted the survey and choices. I have tried both to use the binding and, and (not(selected(${charcoal_time}, 'option1', 'option2' )), but none of them have worked. I really appreciate any assistance in this matter.

Best,
Sam

Survey

type

name

label

hint

relevant

select one from place

place_cook

  1. Where do you usually cook?

select one from yes_no

ventilation

  1. Does the area where you cook have a window/opening for ventilation?

not(selected(${place_cook}, 'outdoors_walls', 'outdoors_no_walls' ))

select one from charcoal_length

charcoal_time

17a. How long have you been using charcoal for cooking in your household?

Choice

List name

Name

label

place

main_partition

In the main building used for living or sleeping (with partition)

place

main_no_partition

In the main building used for living or sleeping (without partition)

place

separate_room

In a separate room used as kitchen

place

separate_building

In a separate building used as kitchen

place

outdoors_walls

Outdoors (with one or two makeshift walls and roof)

place

outdoors_no_walls

Outdoors (open air with no walls)

place

other

Other


Sam Eyde

Shared Value Africa
sam.eyde@sharedvalueafrica.com

South Africa:+27 792 512 547
Zambia: +260 97 100 3288

Skype: sam.eyde
www.sharedvalueafrica.com

--

--

Post: opend...@googlegroups.com

Unsubscribe: opendatakit...@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...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Hi Yaw,
Thank you for the swift reply, your solution worked very well. Unfortunately I have another question should you have time to assist, I have been trying different solutions but lack the know how.
I would like when answered in 32 access to electricity to skip to 33g, so I put ${access_electricity} = 'no' in 33g and it works. Next question, multi select, My household does not use electricity, again skip to 33g. Then in question 33d household don't pay skip to 33g (can't get the right skip. I have attached the survey (xls) and word doc. Again, this request may be too much to ask in such a forum. In any case, I thought I ask as I am quite lost.
Best,
Sam

testsample.xlsx (11.6 KB)

electricity baseline.docx (13.4 KB)

··· On Monday, June 16, 2014 4:27:40 PM UTC+2, Yaw Anokwa wrote: > On Mon, Jun 16, 2014 at 2:23 AM, Sam Eyde wrote:

Hi Yaw,
Please ignore my earlier post, I managed (after several hours) by following
the earlier assistance to almost finish the survey. I am having only one
problem left, when selecting My household does not pay for electricity in
question 33d, it skips to 33f instead to 33g. I have not encountered how to
skip a decimal option before. I tried several options, but non have
succeeded.
Best,
Sam

testsample.xlsx (11.6 KB)

··· On Monday, June 16, 2014 4:27:40 PM UTC+2, Yaw Anokwa wrote: > > Sam, > > selected only takes two inputs -- the node and the value. You'll have to > do something like this: > not(selected(${place_cook}, 'outdoors_walls')) and > not(selected(${place_cook}, 'outdoors_no_walls')) > > Also, make sure you are putting the above in the relevance not in the hint > column. > > Yaw > -- > Need ODK services? http://nafundi.com provides form design, server setup, > professional support, and software development for ODK. > > > On Mon, Jun 16, 2014 at 2:23 AM, Sam Eyde <sam....@sharedvalueafrica.com > wrote: > >> Dear Sir, >> >> I have been trying to solve this problem for the last two days, and can’t >> find the answer online (ODK Binding, formhub, google groups). >> >> I am trying to skip, when the surveyor has ticked two questions in a *multiple >> select*. As well as in a *select one* (bellow) and the surveyor has >> selected two out of five questions, which skips the next question. I have >> bellow inserted the survey and choices. I have tried both to use the >> binding *and, *and (not(selected(${charcoal_time}, '*option1*', >> 'option2' )), but none of them have worked. I really appreciate any >> assistance in this matter. >> >> Best, >> >> Sam >> >> >> >> Survey >> >> *type* >> >> *name* >> >> *label* >> >> *hint* >> >> *relevant* >> >> select one from place >> >> place_cook >> >> 15. Where do you usually cook? >> >> select one from yes_no >> >> ventilation >> >> 16. Does the area where you cook have a window/opening for ventilation? >> >> not(selected(${place_cook}, 'outdoors_walls', 'outdoors_no_walls' )) >> >> >> >> select one from charcoal_length >> >> charcoal_time >> >> 17a. How long have you been using charcoal for cooking in your household? >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> Choice >> >> List name >> >> Name >> >> label >> >> >> >> >> >> >> >> place >> >> main_partition >> >> In the main building used for living or sleeping (with partition) >> >> place >> >> main_no_partition >> >> In the main building used for living or sleeping (without partition) >> >> place >> >> separate_room >> >> In a separate room used as kitchen >> >> place >> >> separate_building >> >> In a separate building used as kitchen >> >> place >> >> outdoors_walls >> >> Outdoors (with one or two makeshift walls and roof) >> >> place >> >> outdoors_no_walls >> >> Outdoors (open air with no walls) >> >> place >> >> other >> >> Other >> >> >> >> >> >> >> >> >> >> **** >> >> Sam Eyde >> >> Shared Value Africa >> >> sam.eyde@sharedvalueafrica.com >> >> South Africa:+27 792 512 547 >> >> Zambia: +260 97 100 3288 >> >> Skype: sam.eyde >> >> www.sharedvalueafrica.com >> >> >> >> -- >> -- >> Post: opend...@googlegroups.com >> Unsubscribe: opendatakit...@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...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > >

Hi Sam,

Skipping is the wrong way to think of it. Skipping implies that you
are jumping to a certain prompt. That's not how ODK's forms work.
Instead you have to think what can make a prompt relevant (e.g.,
visible to user) or not relevant.

I've attached a re-worked form which does what you had in mind. Note
that I group some of the questions into electricity_providers_grp so I
don't have to retype the logic.

Yaw

testsample-v2.xlsx (12.6 KB)

··· On Mon, Jun 16, 2014 at 11:04 PM, wrote: > On Monday, June 16, 2014 4:27:40 PM UTC+2, Yaw Anokwa wrote: >> Sam, >> >> >> selected only takes two inputs -- the node and the value. You'll have to do something like this: >> not(selected(${place_cook}, 'outdoors_walls')) and not(selected(${place_cook}, 'outdoors_no_walls')) >> >> >> >> >> Also, make sure you are putting the above in the relevance not in the hint column. >> >> >> >> Yaw >> >> -- >> Need ODK services? http://nafundi.com provides form design, server setup, professional support, and software development for ODK. >> >> >> >> >> >> On Mon, Jun 16, 2014 at 2:23 AM, Sam Eyde wrote: >> >> >> >> >> >> >> >> Dear Sir, >> I have been trying to solve this problem for the last two days, and can’t find the answer online (ODK Binding, formhub, google groups). >> >> >> I am trying to skip, when the surveyor has ticked two questions in a multiple select. As well as in a select one (bellow) and the surveyor has selected two out of five questions, which skips the next question. I have bellow inserted the survey and choices. I have tried both to use the binding and, and (not(selected(${charcoal_time}, 'option1', 'option2' )), but none of them have worked. I really appreciate any assistance in this matter. >> >> >> Best, >> Sam >> >> Survey >> >> >> type >> >> >> >> >> name >> >> >> label >> >> >> hint >> >> >> relevant >> >> >> select one from place >> >> >> place_cook >> >> >> 15. Where do you usually cook? >> >> >> >> >> >> >> select one from yes_no >> >> >> ventilation >> >> >> 16. Does the area where you cook have a window/opening for ventilation? >> >> >> not(selected(${place_cook}, 'outdoors_walls', 'outdoors_no_walls' )) >> >> >> >> >> >> select one from charcoal_length >> >> >> charcoal_time >> >> >> 17a. How long have you been using charcoal for cooking in your household? >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> Choice >> >> >> List name >> >> >> Name >> >> >> label >> >> >> >> >> >> >> >> >> >> >> >> place >> >> >> main_partition >> >> >> In the main building used for living or sleeping (with partition) >> >> >> place >> >> >> main_no_partition >> >> >> In the main building used for living or sleeping (without partition) >> >> >> place >> >> >> separate_room >> >> >> In a separate room used as kitchen >> >> >> place >> >> >> separate_building >> >> >> In a separate building used as kitchen >> >> >> place >> >> >> outdoors_walls >> >> >> Outdoors (with one or two makeshift walls and roof) >> >> >> place >> >> >> outdoors_no_walls >> >> >> Outdoors (open air with no walls) >> >> >> place >> >> >> other >> >> >> Other >> >> >> >> >> >> >> >> >> >> >> **** >> Sam Eyde >> >> >> Shared Value Africa >> sam.eyde@sharedvalueafrica.com >> >> >> South Africa:+27 792 512 547 >> Zambia: +260 97 100 3288 >> >> >> Skype: sam.eyde >> www.sharedvalueafrica.com >> >> >> >> >> >> >> >> -- >> >> -- >> >> Post: opend...@googlegroups.com >> >> Unsubscribe: opendatakit...@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...@googlegroups.com. >> >> For more options, visit https://groups.google.com/d/optout. > > Hi Yaw, > Thank you for the swift reply, your solution worked very well. Unfortunately I have another question should you have time to assist, I have been trying different solutions but lack the know how. > I would like when answered in 32 access to electricity to skip to 33g, so I put ${access_electricity} = 'no' in 33g and it works. Next question, multi select, My household does not use electricity, again skip to 33g. Then in question 33d household don't pay skip to 33g (can't get the right skip. I have attached the survey (xls) and word doc. Again, this request may be too much to ask in such a forum. In any case, I thought I ask as I am quite lost. > Best, > Sam > > > > -- > -- > 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/d/optout.

Hi Yaw,
Thank you so much, for the advice and assistance.
Best,
Sam

··· On Tuesday, June 17, 2014 4:35:13 PM UTC+2, Yaw Anokwa wrote: > > Hi Sam, > > Skipping is the wrong way to think of it. Skipping implies that you > are jumping to a certain prompt. That's not how ODK's forms work. > Instead you have to think what can make a prompt relevant (e.g., > visible to user) or not relevant. > > I've attached a re-worked form which does what you had in mind. Note > that I group some of the questions into electricity_providers_grp so I > don't have to retype the logic. > > Yaw > > On Mon, Jun 16, 2014 at 11:04 PM, <sam....@gmail.com > wrote: > > On Monday, June 16, 2014 4:27:40 PM UTC+2, Yaw Anokwa wrote: > >> Sam, > >> > >> > >> selected only takes two inputs -- the node and the value. You'll have > to do something like this: > >> not(selected(${place_cook}, 'outdoors_walls')) and > not(selected(${place_cook}, 'outdoors_no_walls')) > >> > >> > >> > >> > >> Also, make sure you are putting the above in the relevance not in the > hint column. > >> > >> > >> > >> Yaw > >> > >> -- > >> Need ODK services? http://nafundi.com provides form design, server > setup, professional support, and software development for ODK. > >> > >> > >> > >> > >> > >> On Mon, Jun 16, 2014 at 2:23 AM, Sam Eyde < sam....@sharedvalueafrica.com> wrote: > >> > >> > >> > >> > >> > >> > >> > >> Dear Sir, > >> I have been trying to solve this problem for the last two days, and > can’t find the answer online (ODK Binding, formhub, google groups). > >> > >> > >> I am trying to skip, when the surveyor has ticked two questions in a > multiple select. As well as in a select one (bellow) and the surveyor has > selected two out of five questions, which skips the next question. I have > bellow inserted the survey and choices. I have tried both to use the > binding and, and (not(selected(${charcoal_time}, 'option1', 'option2' )), > but none of them have worked. I really appreciate any assistance in this > matter. > >> > >> > >> Best, > >> Sam > >> > >> Survey > >> > >> > >> type > >> > >> > >> > >> > >> name > >> > >> > >> label > >> > >> > >> hint > >> > >> > >> relevant > >> > >> > >> select one from place > >> > >> > >> place_cook > >> > >> > >> 15. Where do you usually cook? > >> > >> > >> > >> > >> > >> > >> select one from yes_no > >> > >> > >> ventilation > >> > >> > >> 16. Does the area where you cook have a window/opening for ventilation? > >> > >> > >> not(selected(${place_cook}, 'outdoors_walls', 'outdoors_no_walls' )) > >> > >> > >> > >> > >> > >> select one from charcoal_length > >> > >> > >> charcoal_time > >> > >> > >> 17a. How long have you been using charcoal for cooking in your > household? > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> Choice > >> > >> > >> List name > >> > >> > >> Name > >> > >> > >> label > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> place > >> > >> > >> main_partition > >> > >> > >> In the main building used for living or sleeping (with partition) > >> > >> > >> place > >> > >> > >> main_no_partition > >> > >> > >> In the main building used for living or sleeping (without partition) > >> > >> > >> place > >> > >> > >> separate_room > >> > >> > >> In a separate room used as kitchen > >> > >> > >> place > >> > >> > >> separate_building > >> > >> > >> In a separate building used as kitchen > >> > >> > >> place > >> > >> > >> outdoors_walls > >> > >> > >> Outdoors (with one or two makeshift walls and roof) > >> > >> > >> place > >> > >> > >> outdoors_no_walls > >> > >> > >> Outdoors (open air with no walls) > >> > >> > >> place > >> > >> > >> other > >> > >> > >> Other > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> **** > >> Sam Eyde > >> > >> > >> Shared Value Africa > >> sam....@sharedvalueafrica.com > >> > >> > >> South Africa:+27 792 512 547 > >> Zambia: +260 97 100 3288 > >> > >> > >> Skype: sam.eyde > >> www.sharedvalueafrica.com > >> > >> > >> > >> > >> > >> > >> > >> -- > >> > >> -- > >> > >> Post: opend...@googlegroups.com > >> > >> Unsubscribe: opendatakit...@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...@googlegroups.com. > >> > >> For more options, visit https://groups.google.com/d/optout. > > > > Hi Yaw, > > Thank you for the swift reply, your solution worked very well. > Unfortunately I have another question should you have time to assist, I > have been trying different solutions but lack the know how. > > I would like when answered in 32 access to electricity to skip to 33g, > so I put ${access_electricity} = 'no' in 33g and it works. Next question, > multi select, My household does not use electricity, again skip to 33g. > Then in question 33d household don't pay skip to 33g (can't get the right > skip. I have attached the survey (xls) and word doc. Again, this request > may be too much to ask in such a forum. In any case, I thought I ask as I > am quite lost. > > Best, > > Sam > > > > > > > > -- > > -- > > Post: opend...@googlegroups.com > > Unsubscribe: opendatakit...@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...@googlegroups.com . > > For more options, visit https://groups.google.com/d/optout. >