Skip to main content

Comparison Logic

Scale Question Comparison

Example

Q1. How easy is WeChat Mini Program to use (0=difficult, 10=very easy)? [Scale] Q1

Q2. Why do you find WeChat Mini Program easy to use? [Text] Q2

Custom Logic

if Q1 >= 8 then show Q2  #Show Q2 when Q1 score is 8 or higher

Preview

Tips

Comparison operators include Greater Than (>), Less Than (<), Equal (==), Greater Than or Equal (>=), Less Than or Equal (<=). See Operators

Tips

Same logic works for matrix scale questions, using sub-question scores like if Q1S1 >= 8 then show Q2.

Time Date Comparison

Example

Q1. Please select your birth date? [Date] Q1

Q2. As a 00s, what's your evaluation of milk tea? [Text] Q2

Custom Logic

if Q1 >= 2000-01-01 then show Q2
Note

Depending on the question type, use the corresponding value format from the following table

FormatValue
Year2020
Year Month2020-10
Year Month Day2020-10-24
Hour10:24
Year Month Day Hour2020-10-24 10:24

Two Answers Comparison

Example

Q1. How easy is WeChat Mini Program to use (0=difficult, 10=very easy)? [Scale] Q1

Q2. How easy is QQ Mini Program to use (0=difficult, 10=very easy)? [Scale] Q2

Q3. Why do you find WeChat Mini Program easier to use than QQ Mini Program? [Text] Q3

Custom Logic

if Q1 > Q2 then show Q3 #Show Q3 when Q1 score is greater than Q2 score

Preview

Text Question Comparison

Q1. What's your annual household income? [Text] Q1

Q2. What's your main income source if your annual income is greater than 100,000? [Single Choice] Q2

  • A. Salary
  • B. Investment
if Q1 > 100000 then show Q2 #Show Q2 when Q1 answer is a number greater than 100000

Preview

Answer Count Comparison

When the number of selected options for a question reaches certain conditions, the next question is displayed

Example

Q1. Which platforms do you shop on? [Multiple Choice] Q1

  • A. Yangming Square
  • B. Moon Bay
  • C. Fuhua Li
  • D. Huafashang

Q2. Which shopping platform do you visit most often? [Single Choice] Q2

(Option references Q1's answer)

If a respondent only selects one option for question Q1, then question Q2 lacks meaning. To enhance the respondent's experience, we can add logic to display question Q2 based on the number of selected options. So we add a logic Show Q2 when the number of selected options for Q1 is greater than or equal to 2

Custom Logic

if len Q1 >= 2 then show Q2 #Show Q2 when the number of selected options for Q1 is greater than or equal to 2

Preview

Answer Position Comparison (Sorting Question in xth Position)

When a question option is in the xth position of the answer, the next question is displayed

Example

Q1. Sort the following Apps by usage frequency [Sorting] Q1

  • A. QQ
  • B. WeChat Q1A2
  • C. Feishu

Q2. Why do you mainly use WeChat? [Text] Q2

When WeChat is in the first position in the first question, the second question is displayed

Custom Logic

if index Q1A2 == 1 then show Q2

Preview