Example 1
In the first example below we construct questions, combine them in a survey, and add a rule to skip the second question based on the response to the first question. Then we createScenario objects for contents that will be added to the questions when the survey is run. The effect of this is that the second question will be skipped based on the response to the first question for each individual scenario.
We start by constructing questions:
Here we add a rule to skip q2 based on the response to q1:
Note:Note that we could also use a method for the data type that we are using–this is equivalent:
We can inspect the flow of the survey that has been created with the scenarios that we’re using:

Next we select a model to generate the responses (check available models and pricing):
We run the survey by adding any scenarios, agents and models and then calling the
run:
We can select and inspect any components of the results. We can see by a “None” response that a question was skipped:
Example 2
In the next example, we use the same scenarios to create versions of the questions before we combine them in a survey. This allows us to add a skip rule based on a question/scenario combination, as opposed to skipping a question for all scenarios:loop method creates new versions of questions with scenarios already inserted:

