Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Branching Logic Basics

...

  • always based on previous logic

  • can only be coded within a project, not between multiple projects

  • available between instruments within a project

  • developed using a can be developed by two methods; beginner-friendly drag and drop method or advanced syntax method for use cases not possible with drag and drop.

Example of branching logic development

Develop a field that is only required for certain participants such as the following:

...

Define your parameters for that field such as [gender]='1' (gender is equal to maleage] > 18 (age is greater than 18). You can find your field names and variable designations by going to the Codebook located near “Designer” and “Dictionary” on the left side of the screen.

...

Click the branching logic icon on the field that is only required for certain participants. Here you can drag and drop (easiest method) or use advanced syntax and hand type your logic in the box above. as seen below:

Drag and drop format

Decide which instrument your logic is coming from for that field

...

Drag and drop the field choice for your logic. Here we dragged “sex = female (1)” “[age]” it then allows you to complete your criteria, such as greater than or equal to and add a number. We chose greater than 18. This means that if a participant selects “Female” for “Sex”an age below 18, then the field we are editing the branching logic for, will be not be visible. If they select “Male” or “Prefer not to say”and age above 18, then this field will not be visible. This is the same for surveys or data entry forms. Image Removed

When your participant or study team is completing either the survey or data entry form, they will only see that field when the [gender]='1' age] > 18 from a previously completed field. In this example the “Gender” “age” is selected in the same instrument as the new field, however you can use branching logic across instruments just not across projects.

Here is an example of how to use branching logic across instruments:

...

I am in the Medication instrument, however I want to base a Medication question off an answer to a Demographics question. You can select the drop down box above your Field Choices and select the instrument you want to define your logic from. Remember: it has to be based on a answer that comes before the field you are setting up branching logic for.

Remember:

  • If there is no branching logic for a field, that field will always present itself to every participant.

  • If you rename the variable for a field, remember to change the branching logic that contains that variable name. For instance if you change [gender] to [gender_one], you will need to go to the field that has branching logic [gender]='1' and change the branching logic to [gender_one]='1'.

  • Always test your project thoroughly to ensure your branching logic is working as expected.

...

“<=” less than or equal to

Examples of all math logic

...

Branching Logic with Events

...