Xls2xforms logic

I want to know if is there a way to use a relevance bind that make a
question relevant if the prior question is not a value or is different
on a text question.

i have a question that ask for at least three text answers so i make a
group of text questions where the first three are required. But is
there a chance that the interviewed person didnt know any answer. So i
want to skip the other text fields if the interviewer puts "99" or
"didnt know".
My logic is to make the other tho questions relevant if the prior
answer is different to "didnt know"

Im sorry about my english. Thanks for everything.

To make a question relevance depend on a prior question's relevance
you will need to use a variable for the prior question. The variable
is based on the question name. For example, if I have a question named
"amount" then the variable I use for it will be ${amount}. You can use
these variables in any javarosa supported XPath formula (see:
https://bitbucket.org/javarosa/javarosa/wiki/xform-jr-compat). For
example, if "amount" is a select_one type question and you want to
skip a question if someone selected "didntknow" (select values can't
have spaces, although their labels can), then you would put:
not(selected(${amount}, 'didntknow'))
in it's "relevant" column.
I hope this helps,
-Nathan

··· On Feb 21, 7:17 pm, gap1981 wrote: > I want to know if is there a way to use a relevance bind that make a > question relevant if the prior question is not a value or is different > on a text question. > > i have a question that ask for at least three text answers so i make a > group of text questions where the first three are required. But is > there a chance that the interviewed person didnt know any answer. So i > want to skip the other text fields if the interviewer puts "99" or > "didnt know". > My logic is to make the other tho questions relevant if the prior > answer is different to "didnt know" > > Im sorry about my english. Thanks for everything.

To make a question relevance depend on a prior question's relevance
you will need to use a variable for the prior question. The variable
is based on the question name. For example, if I have a question named
"amount" then the variable I use for it will be ${amount}. You can use
these variables in any javarosa supported XPath formula (see:
https://bitbucket.org/javarosa/javarosa/wiki/xform-jr-compat). For
example, if "amount" is a select_one type question and you want to
skip a question if someone selected "didntknow" (select values can't
have spaces, although their labels can), then you would put:
not(selected(${amount}, 'didntknow'))
in it's "relevant" column.
I hope this helps,
-Nathan

··· Sent from my android device. -----Original Message----- From: Nathan To: ODK Community Sent: Wed, 22 Feb 2012 10:48 AM Subject: [ODK Community] Re: xls2xforms logic

On Feb 21, 7:17 pm, gap1981 gapera...@gmail.com wrote:

I want to know if is there a way to use a relevance bind that make a
question relevant if the prior question is not a value or is different
on a text question.

i have a question that ask for at least three text answers so i make a
group of text questions where the first three are required. But is
there a chance that the interviewed person didnt know any answer. So i
want to skip the other text fields if the interviewer puts "99" or
"didnt know".
My logic is to make the other tho questions relevant if the prior
answer is different to "didnt know"

Im sorry about my english. Thanks for everything.

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en

To make a question relevance depend on a prior question's relevance
you will need to use a variable for the prior question. The variable
is based on the question name. For example, if I have a question named
"amount" then the variable I use for it will be ${amount}. You can use
these variables in any javarosa supported XPath formula (see:
https://bitbucket.org/javarosa/javarosa/wiki/xform-jr-compat). For
example, if "amount" is a select_one type question and you want to
skip a question if someone selected "didntknow" (select values can't
have spaces, although their labels can), then you would put:
not(selected(${amount}, 'didntknow'))
in it's "relevant" column.
I hope this helps,
-Nathan

··· Sent from my android device. -----Original Message----- From: Nathan To: ODK Community Sent: Wed, 22 Feb 2012 10:48 AM Subject: [ODK Community] Re: xls2xforms logic

On Feb 21, 7:17 pm, gap1981 gapera...@gmail.com wrote:

I want to know if is there a way to use a relevance bind that make a
question relevant if the prior question is not a value or is different
on a text question.

i have a question that ask for at least three text answers so i make a
group of text questions where the first three are required. But is
there a chance that the interviewed person didnt know any answer. So i
want to skip the other text fields if the interviewer puts "99" or
"didnt know".
My logic is to make the other tho questions relevant if the prior
answer is different to "didnt know"

Im sorry about my english. Thanks for everything.

--
Post: opendatakit@googlegroups.com
Unsubscribe: opendatakit+unsubscribe@googlegroups.com
Options: http://groups.google.com/group/opendatakit?hl=en