Glue Logic Example
If you want to randomize elements in a survey (using the Randomize checkbox) while also keeping certain answers together, use [glue ...] logic. Specify which elements should stay together using , (AND) to preserve their order, or . (OR) to also randomize the order within the glued group.
For example, say you're asking respondents about their preferred morning beverage and want to group coffee-based and tea-based drinks together.
- Type the question text and answer choices into the editor page.
- Select the Randomize checkbox in the bottom right corner of the question.
- Type the Glue logic syntax into the question text field:
-
[Glue Q1A1,2,3]— glues together the coffee-based options: Latte, Black coffee, and Espresso -
[Glue Q1A5,6]— glues together the tea-based options: Black tea and Green tea - Final logic:
[Glue Q1A1,2,3] [Glue Q1A5,6]
-
- Click Quick Preview in the left sidebar to verify the logic is functioning as desired.
Learn more about Glue logic in the Advanced Logic course in the Lighthouse Academy!