Multiple choices variable

Discussions about creating CAPI applications to run on Android devices
Post Reply
AriSilva
Posts: 595
Joined: July 22nd, 2016, 3:55 pm

Multiple choices variable

Post by AriSilva »

How do we implement multiple choice variables in the dictionary in order for them to appear as checkboxes in the form?
Best
Ari
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Multiple choices variable

Post by josh »

From the help when you search for checkbox:
Check Box

Check Boxes are used to capture multiple response variables. Items using check boxes must be alphanumeric. Each value in the value set corresponds to one of the responses and will be displayed as a separate check box. When the boxes are checked, the corresponding values will be put into the alphanumeric field, from left to right. The length of the field must be a multiple of the maximum length of a response. For example, if each response code is one character and you have five responses, then a field of length five would allow for the selection of all responses. A field of length two would allow for only two responses (e.g., "pick the top two...").
What this means is in your dictionary make the variable alpha and set the length to the maximum number of responses that the user will be allowed to select. Then make a value set where each response has a single character. For example:

Variable: TECHNOLOGY, Type: Alpha, Length: 3

Value set:
  • Radio - A
    TV - B
    Computer - C
Finally make sure that the capture type of the field on the form is set to "Checkbox". You can change the capture type by right clicking on the field on the form and choosing properties.

You can see an example in the Simple CAPI application that you will find in C:\Program Files (x86)\CSPro 6.3\Examples\1 - Data Entry\Simple CAPI

For more info here are some lecture notes from a workshop that covered checkboxes: http://teleyah.com/cspro/DCJune2015/04-CAPI/04-CAPI.pdf
Post Reply