Enable list question with roster

Dear SuSo Team

Suppose I listed fruits name such as banana, orange, etc. Conversely, if there is no fruit name to listing I record “None”. If I record “None” in list question I want to skip the roster.

Best regard

Marady

Depends on what you want to do, or how your questionnaire is designed.

If the roster is fixed and should be enabled if ANY fruit is selected except for ‘none’, then use a syntax like

!MyQuestion.Contains(99)

Assuming 99 is the code for ‘None’.

Thanks @giansib

The question I designed is list (Like household member list). Example Q1. What kind of fruit did you harvest? Then I create “Fruit Name” Roster. In the “Fruit Name” Roster I created Q2. How much %rostertitle% per kg?
My question I would like to know how to skip the “Fruit Name” Roster if I listed “None”?

There are several approaches you can take here.

#1

You might have an initial filter questions:

Q1: “Did you harvest any fruit?”

  1. Yes
  2. No

Then if Q1 == 1, you ask Q2 (your roster trigger): “What kind of fruit…”.

#2

You can have a Yes/No Multi-select question. Where your question would be like

Q1: Did you harvest any of the following fruits?

  1. Strawberry … Yes/No
  2. Mango … Yes/No

Here, “None” would be implied if all fruits receive a “No” answer, and the roster will only be enabled for “Yes” fruit options.

#3

Or simply, your roster condition can include the syntax

!Q1.Contains(99), assuming 99 = ‘None’.

For this design, you might also want to include a validation condition on Q1 like

self.ContainsOnly(99) or !self.Contains(99), to ensure that “None” is only selected if NO other options are selected.

Dear @giansib

Thanks!!! Actually, our purpose we prefer list of fruit name. Have any solution for us?

Have a nice day

Marady

1 Like

Dear @giansib

The finally I got the result from the question I mention above. Thanks for helpful.

1 Like