> For the complete documentation index, see [llms.txt](https://docs.zerowork.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zerowork.io/building-blocks/logic/start-condition-and-set-condition.md).

# Start Condition and Set Condition

<figure><picture><source srcset="https://3220183989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg9LcR8XM7TGOzOCDGsCS%2Fuploads%2Fgit-blob-222161935256a0b7a132f8f7a1fd938574fe51d9%2Fstart-condition-tile-dark.png?alt=media" media="(prefers-color-scheme: dark)"><img src="https://3220183989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg9LcR8XM7TGOzOCDGsCS%2Fuploads%2Fgit-blob-d56d5541368826d0fa04b4536788ccb8878a6790%2Fstart-condition-tile.png?alt=media" alt="Start Condition block" width="279"></picture><figcaption></figcaption></figure>

Conditions let your TaskBot take different paths depending on a value.

* **Start Condition** picks the value to check: a table column or a variable.
* **Set Condition** defines one comparison for that value and starts its own branch. Connect one or more Set Condition building blocks to the Start Condition.

Only one branch runs: the one whose condition is met. Add a Set Condition with the comparison type **Else** for the case that no other condition is met.

{% hint style="warning" %}
Make your conditions mutually exclusive. If several are met, only one of them runs, and which one is not guaranteed.
{% endhint %}

<figure><picture><source srcset="https://3220183989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg9LcR8XM7TGOzOCDGsCS%2Fuploads%2Fgit-blob-29902df798e46b33ed37e46a4968c04eb273de91%2Fstart-condition-settings-dark.png?alt=media" media="(prefers-color-scheme: dark)"><img src="https://3220183989-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fg9LcR8XM7TGOzOCDGsCS%2Fuploads%2Fgit-blob-8cb1f9b799f242e380f4fb5ef3f24c83fe42e319%2Fstart-condition-settings.png?alt=media" alt="Start Condition settings" width="555"></picture><figcaption></figcaption></figure>

### Comparison Types

| Comparison type                                       | The condition is met when the value                                         |
| ----------------------------------------------------- | --------------------------------------------------------------------------- |
| **=** / **≠**                                         | equals / does not equal the text you enter                                  |
| **<**, **>**, **≤**, **≥**                            | is a number smaller / greater than the number you enter                     |
| **Contains keywords** / **Does not contain keywords** | contains at least one / none of the keywords you enter, separated by commas |
| **Data found** / **Data not found**                   | is not empty / is empty                                                     |
| **Longer than** / **Shorter than**                    | has more / fewer characters than the number you enter                       |
| **Before** / **After**                                | is a calendar date earlier / later than the date you enter                  |
| **Is a valid number** / **Is not a valid number**     | is / is not a number                                                        |
| **Else**                                              | meets no other condition of this Start Condition                            |

Text comparisons (=, ≠ and keywords) ignore upper and lower case and surrounding spaces.

### Comparing Dates

**Before** and **After** have two extra settings:

* **Date format**: both dates, the value from Start Condition and the date you enter, must be in the same format (day, month, year order).
* **Days shift (optional)**: a number of days added to the date you enter before comparing. Negative numbers go back. For example, with **After**, today's date and a days shift of -7, the condition is met for dates within the last week.

### Checking More than One Value

A Start Condition checks one value. To check a second value, connect another Start Condition to a Set Condition branch. That second check only runs when the first condition is met.
