The listVar
function iterates through a list and returns the variance of all evaluated statements.
5. How do you see your company's spend changing in the next 3 years in the following areas?
type: radio table
1. Less
2. Same
3. More
rows:
1. Finance
2. Marketing
3. Operations
4. Human Resources
5. Information Technology
6. You indicated more than one type of trend in the next 3 years. Why?
showif: listVar(T5.rows; $Q5R[id])
type: text
Tip! Not sure which list function is best suited for your needs? Review all list functions here.
Details
-
In its most basic form,
listVar
accepts two inputs: a list name and a field reference constructed with the '[id]' placeholder. - Options can be filtered in or out of the list with inclusion/exclusion syntax.
-
listVar
can be used in conditional logic with tags such asshowif
,termif
,cvalue
, andfailif
. - When multiple lists or conditions are used, the list name is prefixed to the
[id]
reference and separated by a colon, (e.g.,[LISTNAME:id]
). Prefixing clarifies list references and is necessary for the software to iterate and sum calculations across different lists. - Though not explicitly tied to tables, table references are imagined to be the most common usage.
Additional examples
In this example, we place the listVar
function on the failif
tag to evaluate the table's variance. If a respondent "straightlines" by selecting the same answer choice for all rows, the failif
tag triggers CheatSweep to lower their score.
18. To what extent do you agree with the following statements when looking to buy vitamins and supplements?
type: radio table
1. Strongly Disagree
2. Disagree
3. Neither agree nor disagree
4. Agree
5. Strongly Agree
rows:
randomize: y
1. I tend to buy products I have previously bought
2. The brand of the supplements product is important to me
3. Branded products are better than private label ones
4. I would buy the cheapest option available
5. I am happy to spend more on products that I think will work
6. I want products that are focused on my specific needs and life stage (e.g. based on my gender, age, health issues etc.)
7. I look to buy vitamins & supplements from brands that are ethical / sustainable
8. I want products that I buy to be backed-up by scientific evidence
9. I always look for products that have strong reviews or recommendations from friends, social media, influencers or advertisements etc.
10. I care about being able get advice from a shop assistant / pharmacist
11. I only decide what brand / product to buy when I go into a store
12. I prefer to use vitamins & supplements that combine a wide range of highly effective ingredients into one product
13. I tend to only buy vitamins & supplements products that are recommended/prescribed by a doctor
failif: listVar(T18.rows; $Q18R[id]) == 0
Comments
0 comments
Please sign in to leave a comment.