Some question types accept extra aytm Logic commands that change how the question behaves for respondents. This article covers two of them: shelf commands, which set product placement in a Shelf Test, and exclusive commands, which keep certain answers from being selected together in checkbox-style questions.
In This Article
Shelf Test: [shelf {...}, {...}...]
A shelf command places products on the shelves of a Shelf Test. Each pair of braces is one shelf, and the numbers inside are products, referenced by their position in your product list. For example, [shelf {1,2,3}, {2,3,4}] places products 1, 2, and 3 on the first shelf and products 2, 3, and 4 on the second. Repeating a number on the same shelf adds a facing: {1,1,2} shows two facings of product 1 next to one of product 2.
Type the command into the Shelf Test question's text field. To make it apply only to some respondents, add if and a condition before the closing bracket.
💡 Tip: You don't need shelf logic to lay out a shelf. Use the shelf editor (Arrange) for that. Use shelf logic when different respondents should see different shelves based on their earlier answers.
Alignment Variants
The command name sets how products are aligned on each shelf.
| Command | Alignment |
|---|---|
[shelf ...] |
Center (the default) |
[shelf-center ...] |
Center. Same result as [shelf ...]
|
[shelf-left ...] |
Left |
[shelf-right ...] |
Right |
[shelf-flex ...] |
Shelf-flex, the same as the shelf editor's Shelf-flex option |
[shelf-group ...] |
Shelf-flex with One price tag per product turned on, so each group of facings shares one price tag |
Examples
-
[shelf {1,2,3}, {2,3,4}]: places products 1, 2, and 3 on the first shelf and products 2, 3, and 4 on the second, centered. -
[shelf-left {1,2,3} if Q1A1]: places products 1, 2, and 3 on the left side of the first shelf, only for respondents who selected Q1A1. -
[shelf-right {1,2,3}, {2,3,4}]: places products 1, 2, and 3 on the right side of the first shelf and products 2, 3, and 4 on the right side of the second. -
[shelf-group {1,1,1}, {2,2,2}]: places three facings of product 1 on the first shelf and three of product 2 on the second, with one price tag under each group.
Which Arrangement a Respondent Sees
Each respondent sees the first arrangement on this list that applies to them:
- A conditional shelf statement (one with
if) whose condition the respondent meets. If several conditions match, the first one in the question text wins. - The arrangement built in the shelf editor.
- A shelf statement without
if, which is used only when the shelf editor's shelves are empty. - Automatic placement.
⚠️ Note: A statement without
ifis ignored when you've placed products in the shelf editor. Alignment comes from whichever source placed the respondent's shelf, so each conditional statement can use a different alignment. A misspelled command (for example,shelf-felx) isn't recognized. It stays in the question text as plain text and places nothing.
Learn more in the How to Use Shelf Test Logic article.
Exclusive Logic
Exclusive logic stops respondents from selecting certain answer options together. Type it into the text field of an answer option. When a respondent selects that option, the options it lists are cleared and grayed out. [exclusive all] does the same to every other option in the question.
You can use exclusive logic in these question types:
- Checkbox questions
- Checkbox screening questions
- Progressive Matrix questions set to Multiple choices
Syntax
| Logic (typed in Q1A5) | What happens when a respondent selects Q1A5 |
|---|---|
[exclusive Q1A1] |
Q1A1 is cleared and grayed out |
[exclusive Q1A2,3] |
Q1A2 and Q1A3 are cleared and grayed out |
[exclusive Q1A1-3] |
Q1A1 through Q1A3 are cleared and grayed out |
[exclusive all] |
Every other option is cleared and grayed out |
[exclusive Q1A1-3 if PQ1A1] |
Same as the range above, but only for respondents who selected PQ1A1 earlier in the survey |
Rules
- Exclusive logic goes on an answer option, not on the question or a sub-question.
- It can only list options from the same question, and an option can't list itself. For example,
[exclusive Q1A1]placed in Q1A1 shows an error. - The rule works in one direction. It acts when the option it's typed in is selected. If a respondent first selects a listed option and then the exclusive option, the earlier choice is cleared. You only need the rule on one of the two options to keep them from being selected together.
- A respondent who selects an option with exclusive logic can continue with that single answer, even if the question's minimum number of choices is higher.
- Punch logic doesn't check exclusive rules. A
[punch]command can fill options that exclusive logic would otherwise keep apart.
Exclusive
In the example below, a respondent who selects Q1A1 (Oil-free) can't also select Q1A2 (Oil-based). A respondent who selects Q1A2 (Oil-based) can't also select A1, A3, or A4. This prevents conflicting answers within the same question.
Exclusive All
[exclusive all] stops a respondent from selecting any other answer once they've chosen the option it's typed in. It works like the N/A option, but you can put it on any answer option and on more than one. In the example below, if a respondent selects A8, no other option can be selected. You can pair it with a follow-up question that uses [show if Q1A8] to route respondents who chose that option.
Exclusive in Progressive Matrix Questions
In a Progressive Matrix question set to Multiple choices, type exclusive logic in the Matrix Answer Option field. Each sub-question gets its own copy of the rule, which triggers only when the respondent selects that answer in that sub-question. In the example below, a respondent who selects SQ1A1 can't also select SQ1A3.
⚠️ Note: A reference to a specific sub-question only works in that sub-question.
[exclusive Q1SQ1A3]keeps A1 and A3 apart in SQ1 and does nothing in SQ2 or the other sub-questions. To make an answer exclusive in every sub-question, use[exclusive all]. In the matrix grid, conflicting options are grayed out rather than unchecked, and options that are grayed out aren't saved with the response.
Learn more in the How to Use Exclusive Logic article.