Display variable in question

Dear All

I would like to know if it is possible to display a variable inside a
question label. Example: I have a select_one question asking the respondent
to state his last job type. I then want to ask him to describe this job
type by inserting the actual job type selected from the previous question,
so if the respondent selected "Sales Clerk" I would like the question to
read "Please tell me how many hours per week you work as a Sales Clerk" and
so forth?

Thanks
Bashir

··· -- Bashir Jahed - Director The OSi LAB (PTY) Ltd www.osilab.net | 083 414 0453 | bashir@osilab.net

Hi Bashir,

If you are using XLSForm ${name_of_prompt} will do it. If you are using ODK
Build, see
http://opendatakit.org/2013/01/metadata-outputs-and-calculates-in-odk-buildfor
an example.

Yaw

··· -- Need ODK services? http://nafundi.com provides form design, professional support, custom reporting, and software development for ODK.

On Sun, Oct 13, 2013 at 12:42 PM, Bashir Jahed admin@osilab.net wrote:

Dear All

I would like to know if it is possible to display a variable inside a
question label. Example: I have a select_one question asking the respondent
to state his last job type. I then want to ask him to describe this job
type by inserting the actual job type selected from the previous question,
so if the respondent selected "Sales Clerk" I would like the question to
read "Please tell me how many hours per week you work as a Sales Clerk" and
so forth?

Thanks
Bashir

--
Bashir Jahed - Director
The OSi LAB (PTY) Ltd
www.osilab.net | 083 414 0453 | bashir@osilab.net

--

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.

For select-one and select-multiple questions, you need to map the value
back into the display string. To do that, use:

jr:choice-name(${yourQuestion}, '${yourQuestion}')

if it is a select-one.

For select-multiple, you would need a more complex expression to either
test for each possible value and return the choice text, or iterate over
the entered choices. See http://opendatakit.org/help/form-design/binding/ for
expressions that can be useful in that case.

Note that this needs to be revised if you are accessing the information
from within a repeat group. Search the group for earlier threads on that
issue.

··· On Sun, Oct 13, 2013 at 3:30 PM, Yaw Anokwa wrote:

Hi Bashir,

If you are using XLSForm ${name_of_prompt} will do it. If you are using
ODK Build, see
http://opendatakit.org/2013/01/metadata-outputs-and-calculates-in-odk-buildfor an example.

Yaw

Need ODK services? http://nafundi.com provides form design, professional
support, custom reporting, and software development for ODK.

On Sun, Oct 13, 2013 at 12:42 PM, Bashir Jahed admin@osilab.net wrote:

Dear All

I would like to know if it is possible to display a variable inside a
question label. Example: I have a select_one question asking the respondent
to state his last job type. I then want to ask him to describe this job
type by inserting the actual job type selected from the previous question,
so if the respondent selected "Sales Clerk" I would like the question to
read "Please tell me how many hours per week you work as a Sales Clerk" and
so forth?

Thanks
Bashir

--
Bashir Jahed - Director
The OSi LAB (PTY) Ltd
www.osilab.net | 083 414 0453 | bashir@osilab.net

--

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.

--

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.

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