Branching allows you to apply conditional logic to Instrument parts to deliver a customized and meaningful experience for your users.
Throughout this section, bear in mind: You can’t have a rule without a condition, and you can’t have a condition without a variable.
To demonstrate branching, we will create a simple choice question (“Do you offer distance learning?”) with radio buttons:
Click the blue list icon and you’ll be taken to this screen:
Under the CHOICES tab you can add as many choices as needed by clicking the blue +Add Choice button and entering the choice options in the text fields to the right of the horizontal lines. In our distance learning example, we will add the following choices: YES, NO, WE WILL NEXT YEAR: Click Done to save the changes.
The choices will now display in the Instrument, and then you need to enter a question – for example: “Do you offer distance learning?”
Now you need to create a Variable. Click on the gear icon and you’ll see this pop-up. Click on the OPTIONS tab to create your variable:
Click Create New and add a name for your variable. In this example, the variable is called Distance Learning:
Click Done and you’ll be taken back to the Instrument. In the example, Distance Learning now gets added to the question key:
Next, we will add another simple question. This one will be a short answer (narrative). We’ll type in “Please describe your approach to distance learning”:
This question is not applicable if respondents answer “NO” or “WE WILL NEXT YEAR”; it’s only applicable if they answer “YES.” So now we’re going to give this a name that we can find. We’ll call it DYES and type that in the question key:
We will now Save our work by clicking on the blue check icon at the top of the page. Then we will click on the big gear icon on the upper right side of the page and navigate to Logic Branching:
We will click on the Variables tab:
Variables and conditions are global. What that means is that any variables or conditions you have on any Instruments in your environment will show up here.
You’ll see the DISTANCE LEARNING variable we created in the list above.
Now we’ll set up a condition.
Click on the Conditions tab. Add your condition name. We’ll call it DLYES and select Match Type “All”:
Next, we will search our variables. When we start typing “DIS…” we’ll see “DISTANCE LEARNING” populate due to Fabric’s built-in type-ahead functionality. We will select that, and then fill in the rest of our condition:
DISTANCE LEARNING Equal to [Text] “YES.”
In other words, if this question (DISTANCELEARNING) equals YES, that is our condition:
For more complex conditions, you can set up additional expressions from the Conditions tab. Click Save.
Now we will set up a Rule by clicking the blue + (plus) button to create a new rule. In the Name field, we will type DLYES, and in the Conditions field, we will type DLYES as well (taking advantage of the type-ahead functionality). Click Apply.
Now we will see all of the questions on every page of the Instrument. We will check the SHOW column for our question, which the system will interpret as: If that question equals YES, we are going to SHOW this question:
This means that by default now, that question (“Please describe your approach to distance learning”) will be hidden until respondents answer “YES” to the previous question (“Do you offer distance learning?”). Now that we’ve set up our rules, we will click Done and go back to the Builder by clicking on the big gear icon on the top right side of the screen, then selecting Designer – Home.
We will hit Save, and then click on Preview to test our branching. (NOTE: You can also edit your Instrument from within the preview.)
You’ll see your variables and rules highlighted in green. As a reminder, you’re in the staff view while previewing this Instrument; your respondents would not see the “variables” and “rules” tags. To test the logic, you can click “Yes” and the question appears; click “No” and it goes away.