Limite the choices based on answers to the previous quesition

Hi guys,
I am trying to limit the choices based on the answers to the previous question.

Like:

a_1:What …?
0. xxx

  1. xxx
  2. xxx
  3. xxx

a_3: What …?
0. xxx

  1. xxx
  2. xxx
  3. xxx
  4. xxx

So, if you choose 2 for a_1, you can only choose 4, 5, 6, 7, 8, 9, 10 or 11 for a_3. And if you choose 3 for a_1, you can only choose 1, 2, 3 or 11 for a_3.

What should I do? Kindly help

Write a filter expression for the second question.
In the filter expression you may refer to any other question in the interview, and also to @optioncode for the code of the option being evaluated.
Options for which the filter expression does not evaluate to true will not be shown as possible choices.

Thanks for your help! As I am a freshman for this web, I have to learn a lot about syntax. Anyway, thanks.

Hi, after reading the description of the filter in the guidebook, I still haven’t been able to understand how to write this string of code. My goal is to restrict which options can only appear in the second question, based on certain options in the first question.

Do you have a relevant case study here that I can refer to?

Again, thank you so much for your reply!

Hello @Yizhi_Liang ,

try:

(a_1 + 100*@optioncode).InList( 402, 502, 602, 702, 
802, 902, 1002, 1102, 103, 203, 303, 1103) || (a_1==1)