# 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="/files/I2qGpLV9UjqOX8ATRMsl" 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="/files/zG1DpCJ8FoJUxDf9zm79" alt=""><figcaption></figcaption></figure>

## Rule details

### **Comparison rule**

<figure><img src="/files/ReiAatfzWVdAHtzAapeF" 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.datasaur.ai/data-studio-projects/lets-get-labeling/label-sets/dynamic-question-set.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
