The desc
element decorator provides alternate text to display in reports. It is useful for shortening lengthy text or providing an alternative description.
1. What type of technician do you <b>primarily</b> use for these types of repairs?
type: radio
1. Non-contract pay-by-the-hour {desc: By the hour}
2. Non-contract flat fee per visit {desc: Flat fee}
3. Contractually obligated {desc: Contract}
4. Near shore outsourced flat fee based {desc: Near shore}
97. Other technician type {autoother: y} {desc: Other}
Details
- The
desc
decorator can be added to individual list elements.
- When a list including
desc
decorators is used across multiple questions, thedesc
text will be carried forward into each question using the list. - The
desc
decorator can also be added to listcalls such asoptsfrom
orrowsfrom
as a shortcut for applying an alternate description for each list element. - If two lists with
desc
decorators are combined to form a crosslist, the resulting crosslist with combine the descriptions into one, singular alternate text for each combination. - If need be,
desc
decorators and thedesc
tag can be applied together on a question or table.
Additional examples
Adding alternate descriptions on a list call
The desc
decorator can be applied to table rows and columns to add clarity and/or brevity. By applying a desc
decorator with a [text]
placeholder to a listcall such as rowsfrom
, each list element's alternate description will have a similar wording.
In the example below, '[text]' will be replaced with the elements from the list FOODS. This results in alternate descriptions like "Rating | Strawberry" for each row in the reporting applets.
setlist: LIKE_OPTS
1. Dislikes
2. Indifferent
3. Likes
99. N/A
setlist: FOODS
randomize: y
1. Strawberry
2. Banana
3. Apple
4. Pear
5. Sweet potato
6. Carrot
7. Avocado
2. What is your child's opinion about each of these baby food flavors?
optsfrom: LIKE_OPTS
type: radio table
rowsfrom: FOODS {desc: Rating | [text] }
Combining alternate descriptions in a crosslist
desc
decorators can also carry forward into crosslists and crosslist quotas. When two lists using desc
decorators are crossed, each combination of elements results in a combined alternate description of "text, text " unless otherwise specified with the crosslist text separator
tag.
In the example below, the crosslist AGEGEN yields option text that merges each pair of options, e.g., "I am a female, 26-41." In the reports, alternate descriptions such as "Male, Gen Z", "Female, Gen Z", "Male, Millenials", etc. are shown instead.
setlist: GEN
1. I am a male {desc: Male}
2. I am a female {desc: Female}
setlist: AGE
1. Under 25 {desc: Gen Z}
2. 26 - 41 {desc: Millenials}
3. 42 - 57 {desc: Gen X}
4. 58 and older {desc: Boomers}
setlist: AGEGEN
cross lists: GEN, AGE
3. Which of the following demographic groups do you fall into?
type: radio
quotas: y
optsfrom: AGEGEN
Comments
0 comments
Please sign in to leave a comment.