XLSForm problem

Hi, I am Minilik.
I want most of my survey question with choos_one type with "specify if other" option. hence I defined each questions and for each I created a text type to specify if "other" is selected.

I used selected(question,'value') syntax on the relevant column of my XLSForm but I couldn't get it correctly on my ODK collect.

example:
on the survey tab:
type name label::eng relevant
choose_one Q203 gender
text Q203_other Specify selected(${Q203},'Q_203_Other')

On the choices tab
list name name label::eng
choices_PAGE_II_Q_203 Q_203_Male Male
choices_PAGE_II_Q_203 Q_203_Female Female
choices_PAGE_II_Q_203 Q_203_Other Other

This compiled to XML and on the ODK collect, It doesn't show me the text box when I select "Other". but it shows-up when I navigate to the previous page or the next page or when I change language.

I couldn't figure out where my mistake is.

Best.

Hi,
my guess is that you have put questions Q_203 and Q_203_other on the the
same screen; if so, your relevant condition won't apply.
Put these two fields on different screens.
Best,

··· Le mercredi 26 avril 2017 20:09:09 UTC+2, Minilik Tesfaye a écrit : > > Hi, I am Minilik. > I want most of my survey question with choos_one type with "specify if > other" option. hence I defined each questions and for each I created a text > type to specify if "other" is selected. > > I used selected(question,'value') syntax on the relevant column of my > XLSForm but I couldn't get it correctly on my ODK collect. > > example: > on the survey tab: > type name label::eng relevant > choose_one Q203 gender > text Q203_other Specify > selected(${Q203},'Q_203_Other') > > > > On the choices tab > list name name label::eng > choices_PAGE_II_Q_203 Q_203_Male Male > choices_PAGE_II_Q_203 Q_203_Female Female > choices_PAGE_II_Q_203 Q_203_Other Other > > This compiled to XML and on the ODK collect, It doesn't show me the text > box when I select "Other". but it shows-up when I navigate to the previous > page or the next page or when I change language. > > I couldn't figure out where my mistake is. > > > Best. > > > > >

Minilik,

I think Amal has this correct. This gotcha is documented at
https://opendatakit.org/help/form-design/workarounds.

Yaw

··· On Thu, Apr 27, 2017 at 4:50 AM, Amal wrote: > Hi, > my guess is that you have put questions Q_203 and Q_203_other on the the > same screen; if so, your relevant condition won't apply. > Put these two fields on different screens. > Best, > > > Le mercredi 26 avril 2017 20:09:09 UTC+2, Minilik Tesfaye a écrit : >> >> Hi, I am Minilik. >> I want most of my survey question with choos_one type with "specify if >> other" option. hence I defined each questions and for each I created a text >> type to specify if "other" is selected. >> >> I used selected(question,'value') syntax on the relevant column of my >> XLSForm but I couldn't get it correctly on my ODK collect. >> >> example: >> on the survey tab: >> type name label::eng relevant >> choose_one Q203 gender >> text Q203_other Specify >> selected(${Q203},'Q_203_Other') >> >> >> >> On the choices tab >> list name name label::eng >> choices_PAGE_II_Q_203 Q_203_Male Male >> choices_PAGE_II_Q_203 Q_203_Female Female >> choices_PAGE_II_Q_203 Q_203_Other Other >> >> This compiled to XML and on the ODK collect, It doesn't show me the text >> box when I select "Other". but it shows-up when I navigate to the previous >> page or the next page or when I change language. >> >> I couldn't figure out where my mistake is. >> >> >> Best. >> >> >> >> > -- > -- > 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.