Selecting from within refrence and displaying it

Hello Good people
I know this could have been asked before, I have tried following all
previous posts but I just can't seem to get around it
I have a repeat group from which people select the different kinds of
diseases they have
I want form within the the repeat to display what the respondent has aksed
, e.g Full Description of selected(${cns}, '3') Defect (including location,
size etc.)
I want it to show name of choice 3 not the number 3
Thanx

First test this on fields outside of a repeat group so that you understand
the syntax.

You want to use the jr:choice-name(${fieldname}, '${fieldname}') function.
And if the ${fieldname} is a select-multiple, you will need to use the
selected-at() function.

E.g., to show the 3rd selected item in a select-multiple response, you
would write:

jr:choice-name(selected-at(${fieldname},3), '${fieldname}')

When working inside repeat groups, you need to use the "../" relative
addressing.

Search the group for "relative path" to read up on those.

And, again, first test out relative paths with simple calculate expressions
to verify that you are accessing the values you want to access, then put
those expressions into the above formula. When doing that, you would
LEAVE UNCHANGED the fieldname when it appears in quotes
. I.e., your
formulas would look like this:

jr:choice-name(selected-at(../fieldname, 3), '${fieldname}')

ยทยทยท On Fri, Jun 12, 2015 at 12:16 AM, Ayoub Kakande wrote:

Hello Good people
I know this could have been asked before, I have tried following all
previous posts but I just can't seem to get around it
I have a repeat group from which people select the different kinds of
diseases they have
I want form within the the repeat to display what the respondent has aksed
, e.g Full Description of selected(${cns}, '3') Defect (including
location, size etc.)
I want it to show name of choice 3 not the number 3
Thanx

--

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