Restricting choices within a filter question

Hello all,

I am coding an xls form using basic xls form command language. The form contains the following multiple select question:

select_multiple Do you have any of these assets now?

  1. Land
  2. House
  3. Livestock (Cows/Goats)
  4. Poultry
  5. TV
  6. Bicycle
  7. Vehicles (bike, car)
  8. Electrical appliances (Fridge, Laptop etc.)
  9. Extended or repaired the house this year

The respondent can select as many of the above as are applicable. If assets are selected a filter question follows asking if the assets chosen were purchased in the last five years:

select_multiple Were any of these assets purchased within the last five years?

  1. Land
  2. House
  3. Livestock (Cows/Goats)
  4. Poultry
  5. TV
  6. Bicycle
  7. Vehicles (bike, car)
  8. Electrical appliances (Fridge, Laptop etc.)
  9. Extended or repaired the house "

I would like to restrict the options that the respondent can select in this question so that they match the options selected in the first question. Does anyone have any ideas as to the constraint command required?

Again, I am not coding this using javarosa etc..so it would need to be in a format that can be typed into the constraint column of an xls form.

Cheers and thank you in advance.

Ebony

If you
Q1 is name of first question
Q2 name of second question

At line about Q2, you write selected(${Q1},name) in column choice_filter.

··· Le mercredi 14 octobre 2015 23:17:05 UTC+1, ebony.be...@gmail.com a écrit : > Hello all, > > I am coding an xls form using basic xls form command language. The form contains the following multiple select question: > > select_multiple Do you have any of these assets now? > > 1. Land > 2. House > 3. Livestock (Cows/Goats) > 4. Poultry > 5. TV > 6. Bicycle > 7. Vehicles (bike, car) > 8. Electrical appliances (Fridge, Laptop etc.) > 9. Extended or repaired the house this year > > > The respondent can select as many of the above as are applicable. If assets are selected a filter question follows asking if the assets chosen were purchased in the last five years: > > select_multiple Were any of these assets purchased within the last five years? > > 1. Land > 2. House > 3. Livestock (Cows/Goats) > 4. Poultry > 5. TV > 6. Bicycle > 7. Vehicles (bike, car) > 8. Electrical appliances (Fridge, Laptop etc.) > 9. Extended or repaired the house " > > > I would like to restrict the options that the respondent can select in this question so that they match the options selected in the first question. Does anyone have any ideas as to the constraint command required? > > Again, I am not coding this using javarosa etc..so it would need to be in a format that can be typed into the constraint column of an xls form. > > Cheers and thank you in advance. > > Ebony

Hi Ebony,

Use a choice_filter.
https://groups.google.com/d/msg/opendatakit/VWAOG9lz4UM/kWPBBl66KnEJ
is a good thread on this topic.

Yaw

··· -- Need ODK consultants? https://nafundi.com provides form design, server setup, in-field training, and software development for ODK.

On Thu, Oct 15, 2015 at 5:17 AM, ebony.bertorelli@gmail.com wrote:

Hello all,

I am coding an xls form using basic xls form command language. The form contains the following multiple select question:

select_multiple Do you have any of these assets now?

  1. Land
  2. House
  3. Livestock (Cows/Goats)
  4. Poultry
  5. TV
  6. Bicycle
  7. Vehicles (bike, car)
  8. Electrical appliances (Fridge, Laptop etc.)
  9. Extended or repaired the house this year

The respondent can select as many of the above as are applicable. If assets are selected a filter question follows asking if the assets chosen were purchased in the last five years:

select_multiple Were any of these assets purchased within the last five years?

  1. Land
  2. House
  3. Livestock (Cows/Goats)
  4. Poultry
  5. TV
  6. Bicycle
  7. Vehicles (bike, car)
  8. Electrical appliances (Fridge, Laptop etc.)
  9. Extended or repaired the house "

I would like to restrict the options that the respondent can select in this question so that they match the options selected in the first question. Does anyone have any ideas as to the constraint command required?

Again, I am not coding this using javarosa etc..so it would need to be in a format that can be typed into the constraint column of an xls form.

Cheers and thank you in advance.

Ebony

--

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, Ebony.
Look at the "Cascading selects" 's tool here http://xlsform.org/#cascade.
Best,

··· Le jeudi 15 octobre 2015 00:17:05 UTC+2, Ebony Bertorelli a écrit : > > Hello all, > > I am coding an xls form using basic xls form command language. The form > contains the following multiple select question: > > select_multiple Do you have any of these assets now? > > 1. Land > 2. House > 3. Livestock (Cows/Goats) > 4. Poultry > 5. TV > 6. Bicycle > 7. Vehicles (bike, car) > 8. Electrical appliances (Fridge, Laptop etc.) > 9. Extended or repaired the house this year > > > The respondent can select as many of the above as are applicable. If > assets are selected a filter question follows asking if the assets chosen > were purchased in the last five years: > > select_multiple Were any of these assets purchased within the last > five years? > > 1. Land > 2. House > 3. Livestock (Cows/Goats) > 4. Poultry > 5. TV > 6. Bicycle > 7. Vehicles (bike, car) > 8. Electrical appliances (Fridge, Laptop etc.) > 9. Extended or repaired the house " > > > I would like to restrict the options that the respondent can select in > this question so that they match the options selected in the first > question. Does anyone have any ideas as to the constraint command required? > > Again, I am not coding this using javarosa etc..so it would need to be in > a format that can be typed into the constraint column of an xls form. > > Cheers and thank you in advance. > > Ebony > >

Thank you!

··· > On Oct 15, 2015, at 5:44 AM, koppsresearchsarl@gmail.com wrote: > > Le mercredi 14 octobre 2015 23:17:05 UTC+1, ebony.be...@gmail.com a écrit : >> Hello all, >> >> I am coding an xls form using basic xls form command language. The form contains the following multiple select question: >> >> select_multiple Do you have any of these assets now? >> >> 1. Land >> 2. House >> 3. Livestock (Cows/Goats) >> 4. Poultry >> 5. TV >> 6. Bicycle >> 7. Vehicles (bike, car) >> 8. Electrical appliances (Fridge, Laptop etc.) >> 9. Extended or repaired the house this year >> >> >> The respondent can select as many of the above as are applicable. If assets are selected a filter question follows asking if the assets chosen were purchased in the last five years: >> >> select_multiple Were any of these assets purchased within the last five years? >> >> 1. Land >> 2. House >> 3. Livestock (Cows/Goats) >> 4. Poultry >> 5. TV >> 6. Bicycle >> 7. Vehicles (bike, car) >> 8. Electrical appliances (Fridge, Laptop etc.) >> 9. Extended or repaired the house " >> >> >> I would like to restrict the options that the respondent can select in this question so that they match the options selected in the first question. Does anyone have any ideas as to the constraint command required? >> >> Again, I am not coding this using javarosa etc..so it would need to be in a format that can be typed into the constraint column of an xls form. >> >> Cheers and thank you in advance. >> >> Ebony > > > If you > Q1 is name of first question > Q2 name of second question > > At line about Q2, you write selected(${Q1},name) in column choice_filter. > >

Super useful - thank you!

··· On Thursday, October 15, 2015 at 9:17:39 PM UTC+5:30, koppsres...@gmail.com wrote: > Le mercredi 14 octobre 2015 23:17:05 UTC+1, ebony.be...@gmail.com a écrit : > > Hello all, > > > > I am coding an xls form using basic xls form command language. The form contains the following multiple select question: > > > > select_multiple Do you have any of these assets now? > > > > 1. Land > > 2. House > > 3. Livestock (Cows/Goats) > > 4. Poultry > > 5. TV > > 6. Bicycle > > 7. Vehicles (bike, car) > > 8. Electrical appliances (Fridge, Laptop etc.) > > 9. Extended or repaired the house this year > > > > > > The respondent can select as many of the above as are applicable. If assets are selected a filter question follows asking if the assets chosen were purchased in the last five years: > > > > select_multiple Were any of these assets purchased within the last five years? > > > > 1. Land > > 2. House > > 3. Livestock (Cows/Goats) > > 4. Poultry > > 5. TV > > 6. Bicycle > > 7. Vehicles (bike, car) > > 8. Electrical appliances (Fridge, Laptop etc.) > > 9. Extended or repaired the house " > > > > > > I would like to restrict the options that the respondent can select in this question so that they match the options selected in the first question. Does anyone have any ideas as to the constraint command required? > > > > Again, I am not coding this using javarosa etc..so it would need to be in a format that can be typed into the constraint column of an xls form. > > > > Cheers and thank you in advance. > > > > Ebony > > > If you > Q1 is name of first question > Q2 name of second question > > At line about Q2, you write selected(${Q1},name) in column choice_filter.

Sorry, I did notice that Yaw had already answered you; it's ok.
Best,

··· Le vendredi 19 mai 2017 18:51:16 UTC+2, Amal a écrit : > > Hi, Ebony. > Look at the "Cascading selects" 's tool here http://xlsform.org/#cascade. > Best, > > Le jeudi 15 octobre 2015 00:17:05 UTC+2, Ebony Bertorelli a écrit : >> >> Hello all, >> >> I am coding an xls form using basic xls form command language. The form >> contains the following multiple select question: >> >> select_multiple Do you have any of these assets now? >> >> 1. Land >> 2. House >> 3. Livestock (Cows/Goats) >> 4. Poultry >> 5. TV >> 6. Bicycle >> 7. Vehicles (bike, car) >> 8. Electrical appliances (Fridge, Laptop etc.) >> 9. Extended or repaired the house this year >> >> >> The respondent can select as many of the above as are applicable. If >> assets are selected a filter question follows asking if the assets chosen >> were purchased in the last five years: >> >> select_multiple Were any of these assets purchased within the >> last five years? >> >> 1. Land >> 2. House >> 3. Livestock (Cows/Goats) >> 4. Poultry >> 5. TV >> 6. Bicycle >> 7. Vehicles (bike, car) >> 8. Electrical appliances (Fridge, Laptop etc.) >> 9. Extended or repaired the house " >> >> >> I would like to restrict the options that the respondent can select in >> this question so that they match the options selected in the first >> question. Does anyone have any ideas as to the constraint command required? >> >> Again, I am not coding this using javarosa etc..so it would need to be in >> a format that can be typed into the constraint column of an xls form. >> >> Cheers and thank you in advance. >> >> Ebony >> >>