On the second question, you can do something like this for the choice filter:
name != ${first_question}
I.e., choose all irrigation sources that were not specified in the first question. The 'name' from the choices tab is the value saved when the item is selected, whereas 'label' is what is displayed to the user.
And if you had a 3rd question,
name != ${first_question} and name != ${second_question}
Things get more complex when you have a multiple-choice question. In that case, you need to use the count-selected() and selected-at() functions to extract each of the values for a filter. http://opendatakit.org/help/form-design/binding/
Mitch
Hi Mitch,
I am having issues here, I have the cascading option working for other questions but i am sure this is an issue with the choice_filter and the example show going from one level down state=${state} to highlight all countries within the selected state.
I need the choice filter to return all unselected options from the same group of choices that haven't been selected previous to appear on the next screen (in a new screen).
I am sure it is just me not knowing the correct coding for the filter, i can provide an example.
Any help greatly appreciated and many thanks
Jon
You want the cascading selects feature, described in http://opendatakit.org/help/form-design/xlsform/
There is an example XLS file here (referenced from that document):
http://opendatakit.org/wp-content/uploads/2012/07/new_cascading_select.xls
Hi Mitch,
Thanks, can you give me an example of what the filter would look like?
Thanks
Jon
Not if they are displayed on the same screen.
If you have them on two screens, you can add a choiceFilter on the second question to exclude the value selected in the first question.
Hi All,
I am wondering if there is away of removing a choice from a second list if it has already been selected in the first; i.e
Q1.a What is the main source of irrigation in use on
the land? River
-
River
-
Dam
-
Canal
-
Karez
-
Bore-well
Q1.b What is the next most used source of irrigation
on the land? Canal
-
Dam
-
Canal
-
Karez
-
Bore-well
Thanks, Jon
--
--
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/groups/opt_out.
--
Mitch Sundt
Software Engineer
University of Washington
mitche...@gmail.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/groups/opt_out.
--
Mitch Sundt
Software Engineer
University of Washington
mitche...@gmail.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/groups/opt_out.
--
Mitch Sundt
Software Engineer
University of Washington
mitche...@gmail.com