> For the complete documentation index, see [llms.txt](https://docs.datasaur.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.datasaur.ai/data-studio-projects/lets-get-labeling/label-sets/dynamic-question-set.md).

# Dynamic Question Set

A dynamic question set lets you show or hide questions based on answers to other questions.

You can set up this logic when [creating a project](/data-studio-projects/creating-a-project.md#step-3-labeler-tasks-sharpvartagopen-if-renderprojectcreationtutorialvideolink-vartagclose-video-tut)[ ](/data-studio-projects/creating-a-project.md#step-3-labeler-tasks-sharpvartagopen-if-renderprojectcreationtutorialvideolink-vartagclose-video-tut)or from the [Question set management](/workspace-management/label-management/question-set-management.md) page. To set it up:

1. Click **Manage question logic** icon located at the bottom right of the question list area.

   <figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-d3f5afac79735bd7a076e5f9278d0b7f0f54a7ec%2FExtension%20%20-%20row%20doc%20labeling%20-%20Edit%20question%20set%20-%20manage%20question%20logic%20tooltip.png?alt=media" alt=""><figcaption></figcaption></figure>
2. Define the logic.
   1. **Always show:** The question is always shown and does not depend on other answers.
   2. **If:** The question is shown only when specific conditions are met.

      <figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-eae58fd42924757009e4ca27e0fea65deb85b842%2FExtension%20%20-%20row%20doc%20labeling%20-%20manage%20question%20logic%20-%20always%20show%20dropdown.png?alt=media" alt=""><figcaption></figcaption></figure>

## Rule details

### **Comparison rule**

<figure><img src="https://448889121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MbjY0HseEqu7LtYAt4d%2Fuploads%2Fgit-blob-12c6860a5838e81b9ec8d89991a0b017541c4bfd%2FExtension%20%20-%20row%20doc%20labeling%20-%20manage%20question%20logic%20-%20starts%20with%20dropdown.png?alt=media" alt=""><figcaption></figcaption></figure>

Each question type supports specific comparison rules, which let you define conditions based on the answer type.

#### Common rules

* `is`: Checks if the answer exactly matches a value.
* `is answered`: Checks whether the question has been answered.
* `contains`: Checks whether the answer includes a specific keyword.
  * **Single answer**: Checks if the keyword is part of the answer (Example: `run` is a substring of `running`).
  * **Multiple answers**: Checks for an exact match (Example: `run` exactly matches `run`).
* `starts with / ends with` : Checks whether the answer begins or ends with specific text.
* `is checked / is unchecked`: Checks whether a checkbox is selected or not.

**Examples:**

* Text question
  * **Q1**: A text question with a single answer
  * **Q2**: A text question with logic applied: `Q1 CONTAINS run`.
  * If you answer **Q1** with `Marathon run` or `running outside`, **Q2** will be activated.
* Dropdown question
  * **Q1**: A dropdown question with a single answer
  * **Q2**: A text question with logic applied: `Q1 CONTAINS run.`
  * If you select `Marathon run` or `running outside` in **Q1**, **Q2** will be activated.

#### Numeric rules

* `> / <`: Checks if a value is greater or less than a specific number.
  * Example:
    * **Q1**: A slider question with a single answer.
    * **Q2**: A text question with logic applied: `Q1 < 8`.
    * If you set **Q1** to `7` or `6`, **Q2** will be activated.
* `≥ / ≤`: Checks if a value is greater than or equal to, or less than or equal to a specific number.
  * Example:
    * **Q1**: A slider question with a single answer.
    * **Q2**: A text question with logic applied: `Q1 ≥ 8`.
    * If you set **Q1** to `8`, `9`, or `10`, **Q2** will be activated.

To understand which rules apply to each question type, refer to the table below.

<table data-full-width="true"><thead><tr><th>Question type/rule</th><th data-type="checkbox">is</th><th data-type="checkbox">is answered</th><th data-type="checkbox">contains</th><th data-type="checkbox">starts with</th><th data-type="checkbox">ends with</th><th data-type="checkbox">is checked</th><th data-type="checkbox">is unchecked</th><th data-type="checkbox">></th><th data-type="checkbox">≥</th><th data-type="checkbox">&#x3C;</th><th width="100" data-type="checkbox">≤</th></tr></thead><tbody><tr><td><a href="/pages/sjMjHjQsHtR5BrPf3PUF#1.-text-field">Text</a></td><td>true</td><td>true</td><td>true</td><td>true</td><td>true</td><td>false</td><td>false</td><td>false</td><td>false</td><td>false</td><td>false</td></tr><tr><td><a href="/pages/sjMjHjQsHtR5BrPf3PUF#2.-text-area">Text area</a></td><td>true</td><td>true</td><td>true</td><td>true</td><td>true</td><td>false</td><td>false</td><td>false</td><td>false</td><td>false</td><td>false</td></tr><tr><td><a href="/pages/sjMjHjQsHtR5BrPf3PUF#3.-dropdown">Dropdown</a></td><td>true</td><td>true</td><td>true</td><td>false</td><td>false</td><td>false</td><td>false</td><td>false</td><td>false</td><td>false</td><td>false</td></tr><tr><td><a href="/pages/sjMjHjQsHtR5BrPf3PUF#4.-hierarchical-dropdown">Hierarchical dropdown</a></td><td>true</td><td>true</td><td>true</td><td>false</td><td>false</td><td>false</td><td>false</td><td>false</td><td>false</td><td>false</td><td>false</td></tr><tr><td><a href="/pages/sjMjHjQsHtR5BrPf3PUF#5.-date">Date</a></td><td>true</td><td>true</td><td>false</td><td>false</td><td>false</td><td>false</td><td>false</td><td>false</td><td>false</td><td>false</td><td>false</td></tr><tr><td><a href="/pages/sjMjHjQsHtR5BrPf3PUF#6.-time">Time</a></td><td>true</td><td>true</td><td>false</td><td>false</td><td>false</td><td>false</td><td>false</td><td>false</td><td>false</td><td>false</td><td>false</td></tr><tr><td><a href="/pages/sjMjHjQsHtR5BrPf3PUF#9.-checkbox">Checkbox</a></td><td>false</td><td>false</td><td>false</td><td>false</td><td>false</td><td>true</td><td>true</td><td>false</td><td>false</td><td>false</td><td>false</td></tr><tr><td><a href="/pages/sjMjHjQsHtR5BrPf3PUF#11.-radio-button">Radio button</a></td><td>true</td><td>true</td><td>false</td><td>false</td><td>false</td><td>false</td><td>false</td><td>false</td><td>false</td><td>false</td><td>false</td></tr><tr><td><a href="/pages/sjMjHjQsHtR5BrPf3PUF#7.-slider">Slider</a></td><td>true</td><td>false</td><td>false</td><td>false</td><td>false</td><td>false</td><td>false</td><td>true</td><td>true</td><td>true</td><td>true</td></tr><tr><td><a href="/pages/sjMjHjQsHtR5BrPf3PUF#10.-url">URL</a></td><td>true</td><td>true</td><td>true</td><td>true</td><td>true</td><td>false</td><td>false</td><td>false</td><td>false</td><td>false</td><td>false</td></tr></tbody></table>

### **Conjunction rule**

For conditional logic, you can use two conjunctions:

* `AND`: All conditions must be true for the question to appear.
* `OR`: Only one condition needs to be true for the question to appear.
