# Condition

The block checks the specified condition for truthfulness, and depending on the result, the scenario execution continues towards the "Yes" exit (the condition was met) or "No" exit (the condition was not met).

For example, the condition `$a == "Hello"` checks whether the value of the variable `$a` is equal to the value `"Hello"`, while the condition `$Result > 5` checks whether the value of the variable `$Result` exceeds `5`.

The condition can contain mathematical and logical operations, constants, functions, other variables, etc. Examples of expressions that can be used in conditions are available by clicking the button ![](https://3212714295-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FI0zUnKkOuy6lWt7DZ46u%2Fuploads%2Fgit-blob-a67c7bc457e7fe6eec0b8a6f34824a537def29d5%2Fimage%20\(173\).png?alt=media) next to the Condition property.

<table data-header-hidden><thead><tr><th width="235" valign="top"></th><th width="323" valign="top"></th></tr></thead><tbody><tr><td valign="top">Condition</td><td valign="top"><p>[Any expression] Depending on the value of this expression, the scenario execution will continue with the "Yes" or "No" exit.</p><p>The value of the expression equivalent to</p><p><code>0</code> (zero) or <code>$False</code> is equated to "No", all other values are equated to "Yes".</p><p>For example, if the variable <code>$a</code> was previously assigned the value <code>5</code>, then the condition <code>$a > 2</code> is true, while the condition <code>$a == 6</code> is false.</p></td></tr><tr><td valign="top">Error Handling Level</td><td valign="top"><p>Select the error handling level. Possible values:</p><ul><li>"Default" - by default;</li><li>"Ignore" - errors are ignored;</li><li>"Handle" - errors are handled.</li></ul><p>If "Default" is selected, the value from the "Start" block of this diagram will be used.</p></td></tr><tr><td valign="top">Exit Direction</td><td valign="top"><p>Select the exit direction from the block in case of an error. Possible values:</p><ul><li>"Default" - by default;</li><li>"Right" - to the right;</li><li>"Bottom" - down.</li></ul><p>This property allows you to determine the exit direction in case of errors for blocks that do not contain the "If Error" connector (for example, the "Condition" block).</p><p>If "Default" is selected, the value from the "Start" block of this diagram will be used.</p></td></tr><tr><td valign="top">Message Level</td><td valign="top"><p>Select the message level that the blocks will output during operation. Possible values:</p><ul><li>"Default" - by default;</li><li>"Release" - output is disabled;</li><li>"Debug" - outputs main information;</li><li>"Detailed" - outputs detailed information.</li></ul><p>If "Default" is selected, the value from the "Start" block of this diagram will be used.</p></td></tr><tr><td valign="top">Error Text</td><td valign="top">[Text] Returns detailed information about the error in case of incorrect execution of the block's work.</td></tr></tbody></table>
