I feel like there is a very simple answer to what I need to do, but for some reason I'm not able to see it.
Basically I have a question that references the respondent's answer to a previous question. Easy enough, except that if I use ${prev_question} in the new question's label, the value of the previous question's answer is displayed not the label of the answer (multiple choice question).
e.g.
Previous question: what age bracket are you?
answers:
(in excel "choices" sheet)
name label
(1) 10-20
(2) 20-30, etc
(3) ...
Next question: How responsible do you think people in the {age bracket label} bracket are?
right now when i use ${prev_question} the name value pops into the question rather then the label.
I feel like there is a very simple answer to what I need to do, but for some reason I'm not able to see it.
Basically I have a question that references the respondent's answer to a previous question. Easy enough, except that if I use ${prev_question} in the new question's label, the value of the previous question's answer is displayed not the label of the answer (multiple choice question).
e.g.
Previous question: what age bracket are you?
answers:
(in excel "choices" sheet)
name label
(1) 10-20
(2) 20-30, etc
(3) ...
Next question: How responsible do you think people in the {age bracket label} bracket are?
right now when i use ${prev_question} the name value pops into the question rather then the label.
Thanks for the advice! I tried it out, and the form published fine but when I went through to test it when I tried to swipe past the question with the jr:choice-name command ODK crashed.
I've attached an excerpt file from my main file with the relevant questions. You'll see that I ask employment and then reference this in two later questions (lines 14 and 26)
Thanks for the advice! I tried it out, and the form published fine but
when I went through to test it when I tried to swipe past the question with
the jr:choice-name command ODK crashed.
I've attached an excerpt file from my main file with the relevant
questions. You'll see that I ask employment and then reference this in two
later questions (lines 14 and 26)
Ooops! Fixed that, and now it loads and doesn't crash....but nothing shows up when I later reference my calculate line with the jr:choice-name calculation.
···
On Tuesday, January 21, 2014 2:38:44 PM UTC+1, ニコノコ wrote:
> Martha, you missed a "$":
>
> if( string-length(${employment}) != 0, jr:choice-name (${employment}, '${employment}' ), 'unspecified')
>
>
>
>
> On Tuesday, January 21, 2014, wrote:
>
> Hi Yaw,
>
>
>
> Thanks for the advice! I tried it out, and the form published fine but when I went through to test it when I tried to swipe past the question with the jr:choice-name command ODK crashed.
>
>
>
> I've attached an excerpt file from my main file with the relevant questions. You'll see that I ask employment and then reference this in two later questions (lines 14 and 26)
>
>
>
> What have I done wrong?
>
> Cheers,
>
> Martha
>
>
>
> --
>
> --
>
> 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/groups/opt_out.
>
>
>
> --
>
> --
> Nik
> Need help customizing Survey Instruments/Tools/Forms for ODK Collect? Drop me an email.
It seems to work just fine on ODK Collect 1.4. What does your choices sheet
look like?
···
On Wednesday, January 22, 2014, wrote:
Ooops! Fixed that, and now it loads and doesn't crash....but nothing shows
up when I later reference my calculate line with the jr:choice-name
calculation.
argh!
Martha
On Tuesday, January 21, 2014 2:38:44 PM UTC+1, ニコノコ wrote:
On Tuesday, January 21, 2014, <m.ro...@gmail.com <javascript:;>> wrote:
Hi Yaw,
Thanks for the advice! I tried it out, and the form published fine but
when I went through to test it when I tried to swipe past the question with
the jr:choice-name command ODK crashed.
I've attached an excerpt file from my main file with the relevant
questions. You'll see that I ask employment and then reference this in two
later questions (lines 14 and 26)
choices sheet attached (of course in my actual file i have the sheets labeled properly survey and choices). I have the most recent ODK Collect so I'm thinking there's something not right in my code.
···
On Wednesday, January 22, 2014 2:28:33 AM UTC+1, ニコノコ wrote:
> It seems to work just fine on ODK Collect 1.4. What does your choices sheet look like?
>
> On Wednesday, January 22, 2014, wrote:
>
> Ooops! Fixed that, and now it loads and doesn't crash....but nothing shows up when I later reference my calculate line with the jr:choice-name calculation.
>
>
>
> argh!
>
>
>
> Martha
>
>
>
>
>
>
>
>
>
> On Tuesday, January 21, 2014 2:38:44 PM UTC+1, ニコノコ wrote:
>
> > Martha, you missed a "$":
>
> >
>
> > if( string-length(${employment}) != 0, jr:choice-name (${employment}, '${employment}' ), 'unspecified')
>
> >
>
> >
>
> >
>
> >
>
> > On Tuesday, January 21, 2014, wrote:
>
> >
>
> > Hi Yaw,
>
> >
>
> >
>
> >
>
> > Thanks for the advice! I tried it out, and the form published fine but when I went through to test it when I tried to swipe past the question with the jr:choice-name command ODK crashed.
>
> >
>
> >
>
> >
>
> > I've attached an excerpt file from my main file with the relevant questions. You'll see that I ask employment and then reference this in two later questions (lines 14 and 26)
>
> >
>
> >
>
> >
>
> > What have I done wrong?
>
> >
>
> > Cheers,
>
> >
>
> > Martha
>
> >
>
> >
>
> >
>
> > --
>
> >
>
> > --
>
> >
>
> > 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/groups/opt_out.
>
> >
>
> >
>
> >
>
> > --
>
> >
>
> > --
>
> > Nik
>
> > Need help customizing Survey Instruments/Tools/Forms for ODK Collect? Drop me an email.
>
>
>
> --
>
> --
>
> 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/groups/opt_out.
>
>
>
> --
>
> --
> Nik
> Need help customizing Survey Instruments/Tools/Forms for ODK Collect? Drop me an email.