# Using Logic

## Introduction

Whether you’re setting Display Logic on a question, Branch Logic in the Survey Flow, or even conditions for Email Triggers, understanding how to implement logic is the key to creating conditional actions.

Logic is used with the following features in the Research Suite:

• Branch Logic for showing a set of questions conditionally.
• Display Logic for showing a single question conditionally.
• Email Triggers for conditionally sending an email upon survey completion.
• Panel Triggers for conditionally adding a participant to a Panel upon survey completion.
• Quotas for determining which participants should count towards a response limit you set.
Similar logic options are also available for filtering reports and creating samples of Panel members.

## Working with Conditions

Logic is based on conditions. A condition is built using a series of drop-down menus, like this:

This question will display if a respondent selects Male from the question What is your gender?

When the condition is met, an action will take place. This action can be anything from incrementing a Quota (for Quota logic) to displaying a question (for Display Logic).

### Working with Multiple Conditions

Sometimes the logic you would like to create will require multiple conditions. These conditions can be connected with And conjunctions or with Or conjunctions. And conjunctions connect statements, while Or conjunctions separate them.

All females can view this question, while males can only view it if the male Quota has not been met.

With Logic Sets, you can take this one step further and define multiple groupings of logic statements.

In this example, not only do participants have to match one of the two conditions specified in the first Logic Set (male and the Quota has not been met, or female), but they must also be the primary decision maker.

### To add a new condition:

1. Click the + button to the right of an existing condition.

2. Select whether your new statement should be an And statement, an Or statement, or part of a new Logic Set.

Now that you have learned the basics of how logic works in Qualtrics, we can dive into the specific types of logic available. Continue reading to learn how to base your logic off of different items such as survey questions and Embedded Data.

## Question Logic

To set logic based on a question, do the following:

1. From the first list, choose Question.
2. From the second list, choose a specific question.
3. From the third list, choose an answer choice.
4. From the fourth list, choose how the participant should interact with the choice. Selected and Not Selected are the most common options here.

A question with this logic will only display to those who indicate they use Qualtrics.

## Embedded Data Logic

Embedded Data fields connect additional information to each response, such as an ID number or a supervisor name.

To set logic based on Embedded Data, do the following:

1. From the first list, choose Embedded Data.
2. In the green text box, enter the name of the Embedded Data field you would like to use in your logic.
3. Enter a value to use for your logic.
4. Choose how the respondent’s Embedded Data value should compare to the value you specified. Options such as Equal to and Greater than are available.

A question with this logic will only show to those whose Embedded Data field Age is equal to 27.

## Panel Field Logic

If you’re planning to distribute your survey using a Panel, Panel information such as name and email address can be used in logic conditions.

To set logic based on a Panel Field, do the following:

1. From the first list, choose Panel.
2. From the second list, choose a panel field such as First Name or Email.
3. Enter the panel value to be used for your logic.
4. Choose how the respondent’s Panel field value should compare to the value you specified. Options such as Equal to and Contains are available.

A question with this logic will only display to those participants with a qualtrics.com email address.

## Quota Logic

Quotas allow you to keep track of how many participants in certain groups have completed your survey. Logic conditions can be based on whether or not a specific Quota has been met.

To set logic based on a Quota, do the following:

1. From the first list, choose Quota.
2. From the second list, select which quota.
3. From the third list, decide if you want to display if the quota Has been met or Has not been met.

A question with this logic won’t be displayed until the Males quota has been met.

## GeoIP Location Logic

Using the respondent’s IP address, Qualtrics can estimate their location. This information can be used in your survey logic.

To set logic based on GeoIP Location, do the following:

1. From the first list, choose GeoIP Location.
2. From the second list, select the location category. Options such as Country and City are available.
3. From the third list, choose equal to, not equal to, and so on. In the green box, enter the location identifier, such as a postal code.

A question with this logic will not be shown to participants in the 84601 area code.

## Filters in Reporting

Reporting filters are set up similarly to traditional logic. These filters can be based on questions and Embedded Data, as well as a few additional fields:

• Completion Status: From the red drop-down menu, choose Filter by Completion Status. Then choose whether to include All respondents, respondents who Completed the survey, or respondents who only gave a Partial response. Finally, click Apply the Filter.
• Date: From the red drop-down menu, choose Filter by Date. Then choose whether to base logic off of the Survey Start Date or Survey End Date. Finally, choose a date range and click Apply the Filter.
• Scoring: From the red drop-down menu, choose Filter by Scoring. Then choose a Scoring Category. Enter a score and specify how the participant’s score should compare to this score to be included in the report. Finally, click Apply the Filter.