Can I use 'not applicable' as a response option for select_one?

Hello!
I've programmed in excel a lot questions (ie. 500) that use select_one
(and later the relevancy adds up the responses to move on/skip to other
questions). I'm trying to find a simple way to fix this without having to
re-do the whole thing using 'checklist' which looks more appropriate...

In my choices tab I used:

list_namenamelabelAlcohol_Response1YesAlcohol_Response0NoAlcohol_Response
UnknownUnknownAlcohol_ResponseRefusedRefusedAlcohol_ResponseNANot Applicable
Because I used words (e.g. Unknown/Refused/NA under the name column) it
won't add and skip properly (using relevant codes below) because they are
words, and not strings. Is there a value (e.g. -1) or something like it
that I can write in instead of those words? I know -1 just subtracts 1 from
the sum. I'm basically looking for a dummy variable, or placeholder
variable that won't interfere with the addition of the responses (ie. in
checklist, you can use -1).

Here is an example of the code that uses those responses:
(int(${Alcohol_Current_A11a})+int(${Alcohol_Current_A11b}))=1
or
selected(${Alcohol_Impact}, '1')

Any help would be appreciated, before I have to re-write many many formulas
:slight_smile:

Cheers!
Amber

I believe this was already answered on an earlier thread. There is no
function that tests whether a value is a string or integer value, so your
best approach is to change the 'unknown' to a numeric value and
conditionally detect and not sum that value in. See the earlier answer.

Sorry for your pain. The golden rule of software development is early
end-to-end walk-throughs ("early integration"), and that applies here --
whenever you start writing a survey, be sure to periodically test filling
it out and doing analysis on the resulting dataset. The earlier you debug
the end-to-end operations, even if only a portion of the form data is
asked, the earlier you will uncover problems with usability or data
analysis.

··· On Mon, Oct 27, 2014 at 2:07 PM, Amber Rieder wrote:

Hello!
I've programmed in excel a lot questions (ie. 500) that use select_one
(and later the relevancy adds up the responses to move on/skip to other
questions). I'm trying to find a simple way to fix this without having to
re-do the whole thing using 'checklist' which looks more appropriate...

In my choices tab I used:

list_namenamelabelAlcohol_Response1YesAlcohol_Response0NoAlcohol_Response
UnknownUnknownAlcohol_ResponseRefusedRefusedAlcohol_ResponseNANot
Applicable
Because I used words (e.g. Unknown/Refused/NA under the name column) it
won't add and skip properly (using relevant codes below) because they are
words, and not strings. Is there a value (e.g. -1) or something like it
that I can write in instead of those words? I know -1 just subtracts 1 from
the sum. I'm basically looking for a dummy variable, or placeholder
variable that won't interfere with the addition of the responses (ie. in
checklist, you can use -1).

Here is an example of the code that uses those responses:
(int(${Alcohol_Current_A11a})+int(${Alcohol_Current_A11b}))=1
or
selected(${Alcohol_Impact}, '1')

Any help would be appreciated, before I have to re-write many many
formulas :slight_smile:

Cheers!
Amber

--

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.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

Thanks Mitch,
I did the above, and it works swimmingly. I thought I had done thorough
testing (my yes and no values were the most important), and I'm not sure
why I hadn't checked that the summing was working with the 'not
applicable/unknown' responses. I guess I'm still a beginner, but learning
quickly!

Thanks for your help!

Amber

··· On Wed, Oct 29, 2014 at 1:20 PM, Mitch Sundt wrote:

I believe this was already answered on an earlier thread. There is no
function that tests whether a value is a string or integer value, so your
best approach is to change the 'unknown' to a numeric value and
conditionally detect and not sum that value in. See the earlier answer.

Sorry for your pain. The golden rule of software development is early
end-to-end walk-throughs ("early integration"), and that applies here --
whenever you start writing a survey, be sure to periodically test filling
it out and doing analysis on the resulting dataset. The earlier you debug
the end-to-end operations, even if only a portion of the form data is
asked, the earlier you will uncover problems with usability or data
analysis.

On Mon, Oct 27, 2014 at 2:07 PM, Amber Rieder amber.rieder@gmail.com wrote:

Hello!
I've programmed in excel a lot questions (ie. 500) that use select_one
(and later the relevancy adds up the responses to move on/skip to other
questions). I'm trying to find a simple way to fix this without having to
re-do the whole thing using 'checklist' which looks more appropriate...

In my choices tab I used:

list_namenamelabelAlcohol_Response1YesAlcohol_Response0NoAlcohol_Response
UnknownUnknownAlcohol_ResponseRefusedRefusedAlcohol_ResponseNANot
Applicable
Because I used words (e.g. Unknown/Refused/NA under the name column) it
won't add and skip properly (using relevant codes below) because they are
words, and not strings. Is there a value (e.g. -1) or something like it
that I can write in instead of those words? I know -1 just subtracts 1 from
the sum. I'm basically looking for a dummy variable, or placeholder
variable that won't interfere with the addition of the responses (ie. in
checklist, you can use -1).

Here is an example of the code that uses those responses:
(int(${Alcohol_Current_A11a})+int(${Alcohol_Current_A11b}))=1
or
selected(${Alcohol_Impact}, '1')

Any help would be appreciated, before I have to re-write many many
formulas :slight_smile:

Cheers!
Amber

--

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.

--
Mitch Sundt
Software Engineer
University of Washington
mitchellsundt@gmail.com

--

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 a topic in the
Google Groups "ODK Community" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/opendatakit/ekaP9z_ITC0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
opendatakit+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Amber D. Rieder, B.A., B.Sc., PhD.(c)
MiNDS | McMaster Integrative Neuroscience Discovery & Study
Graduate Neuroscience Program, McMaster University
PC 329 - 1280 Main Street West,
Hamilton, ON. L8S 4L8
Email: riedera@mcmaster.ca
Phone: 905.525.9140 x24784