> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# The Condition Builder

> Use the condition builder to define logic-based rules that control workflow execution paths in Blink.

## The Basic vs Advanced Condition Builder

Conditions allow you to define logic-based rules that control behavior or outcomes across the platform. The **Blink Platform** offers two ways to create conditions

1. The [Basic Condition Builder](#the-basic-condition-builder),
2. The [Advanced Condition Builder](#the-advanced-condition-builder-and-nested-conditions).

***

## The Basic Condition Builder

The Basic Condition Builder provides an intuitive, code-free way to create comparisons. It supports logical operators like `AND` and `OR` and a wide range of comparison types, making it easy to define straightforward workflow logic.

### Using the Basic Condition Builder in the Blink platform

The **Basic Condition Builder** is used in several areas across Blink’s platform, including the following scenarios:

<Warning>
  The following are illustrative examples intended to help you understand how the Condition Builder can be used across the Blink platform. Your actual configuration may vary depending on your specific use case and requirements.
</Warning>

<Accordion title="Event-Based Workflows" icon="circle-1">
  <Note>Additional conditions can be applied to limit which events trigger a Workflow. For example, if your Workflow is triggered when an event is received, you can add a condition stating that it will run only if it is received by a user with a specific ID. For more information about the about Event-Based Workflows, navigate [here](/docs/workflows/building-workflows/triggers/event-based-triggers/event-based-triggers) </Note>

  <Steps>
    <Step title="Select Trigger Source and Action">
      When creating an Event-Based Workflow, in the 'Trigger setup', select a service provider, and the event you wish to trigger the Workflow.
    </Step>

    <Step title="Enable Conditions">
      Toggle the 'Add condition' button. The condition builder consists of three parts: the left value, the operator, and the right value.
    </Step>

    <Step title="Set Condition Values">
      To apply a condition, click on and enter each value. Select an operator from the dropdown menu that appears when you click on it.
    </Step>

    <Step title="Add Logical Operators">
      Use `AND` or `OR` operators to further define your statement. The condition appears in the text window on the right side.
    </Step>

    <Step title="Apply the Condition">
      Click **Apply**.
    </Step>
  </Steps>

  <Frame>
    <img src="https://mintcdn.com/blinkops-2/4a8dMD2Jv5wsADYv/img/Automations/ConditionBuilderAnd.png?fit=max&auto=format&n=4a8dMD2Jv5wsADYv&q=85&s=d0fce47ab3bf157f27189413671e22bb" width="2006" height="1162" data-path="img/Automations/ConditionBuilderAnd.png" />
  </Frame>
</Accordion>

<Accordion title="Using the Basic Condition Builder in an `If` Action" icon="circle-2">
  <Note>For more information about the `If` action, navigate [here](/docs/workflows/building-workflows/actions/basic-actions/flow-control-actions#if-%26-if-else-statements) </Note>

  <Steps>
    <Step title="Add an `if` or `if else` Action">
      In the [Workflow Editor](/docs/workflows/building-workflows/workflow-editor) page, select an [if](/docs/workflows/building-workflows/actions/basic-actions/flow-control-actions) action.
    </Step>

    <Step title="Define the Condition">
      To apply a condition, click on and enter each value. Select an operator from the dropdown menu that appears when you click on it.
    </Step>

    <Step title="Add Logical Operators">
      Use `AND` or `OR` operators to further define your statement. The condition appears in the text window on the right side.

      <Frame>
        <img src="https://mintcdn.com/blinkops-2/4a8dMD2Jv5wsADYv/img/Automations/ConditionBuilder.png?fit=max&auto=format&n=4a8dMD2Jv5wsADYv&q=85&s=682e0ff68be9a0a5688ea5429e0fb0ab" width="1728" height="1078" data-path="img/Automations/ConditionBuilder.png" />
      </Frame>
    </Step>
  </Steps>
</Accordion>

<Accordion title="Using the Basic Condition Builder in an `Switch Case` action" icon="circle-2">
  <Note>For more information about the `Switch Case` action, navigate [here](/docs/workflows/building-workflows/actions/basic-actions/flow-control-actions#switch-case) </Note>

  The Basic Condition Builder in the [Switch Case ](/docs/workflows/building-workflows/actions/basic-actions/flow-control-actions#switch-case) Action lets you control workflow execution based on the value of a variable. For each case, you define a specific condition to compare against the switch variable, and only the matching case’s actions will run. This provides an intuitive, code-free way to route workflow logic, making it easy to handle multiple scenarios with clear, straightforward comparisons.

  <Frame>
    <img src="https://mintcdn.com/blinkops-2/vVU9PEubpmnJVn0j/img/Actions/SwitchVar.png?fit=max&auto=format&n=vVU9PEubpmnJVn0j&q=85&s=43d2936559c83d08f83c0db55e56e2a5" width="1728" height="1085" data-path="img/Actions/SwitchVar.png" />
  </Frame>
</Accordion>

***

## The Advanced Condition Builder and Nested Conditions

For more advanced scenarios, the **Advanced Condition Builder** allows the use of **nested conditions**, conditions grouped within other conditions. Nested conditions let you apply specific operators (`AND`/`OR`) to a subset of conditions independently from the main set, enabling more sophisticated and precise workflow logic.

<Frame>
  <img src="https://mintcdn.com/blinkops-2/1QMLKkKyjTgDUpCV/img/Automations/CaseComplexConditionBuilder.png?fit=max&auto=format&n=1QMLKkKyjTgDUpCV&q=85&s=b73be39705ae609bd084379848989379" width="1728" height="1082" data-path="img/Automations/CaseComplexConditionBuilder.png" />
</Frame>

***

### Using the Advanced Condition Builder in the Blink Platform

<Accordion title="Using the Advanced Condition Builder in Tables" icon="circle-3">
  <Note>For more information about **Table Views**, see the relevant sections in both [Case Management Tables](/docs/case-management/managing-cases/managing-cases#table-views) and [Tables](/docs/blink-platform/tables/viewing-tables#table-views).</Note>

  The Condition Builder can be used when creating custom **Table Views**. Table Views allow you to personalize how data is displayed in the [Tables](/docs/blink-platform/tables/viewing-tables#table-views) feature or in [Case Management Tables](/docs/case-management/managing-cases/managing-cases#table-views) like: Cases, Tasks, or Alerts. Each table comes with a few built-in views (such as *All Cases*, *My Tasks*, or *Critical Alerts*), but you can also define your own. When configuring a new view, the condition builder lets you apply filters based on specific conditions so you can tailor what appears in the table.

  You can also create **nested conditions**, groups of conditions within other conditions. Nested conditions let you define more Advanced logic by applying specific operators (`AND` / `OR`) to a subset of conditions independently from the main set.

  <Frame>
    <img src="https://mintcdn.com/blinkops-2/1QMLKkKyjTgDUpCV/img/Automations/CaseComplexConditionBuilder.png?fit=max&auto=format&n=1QMLKkKyjTgDUpCV&q=85&s=b73be39705ae609bd084379848989379" width="1728" height="1082" data-path="img/Automations/CaseComplexConditionBuilder.png" />
  </Frame>
</Accordion>

<Accordion title="Using the Advanced Condition Builder in Dashboards" icon="circle-4">
  <Note> For more detailed information about the 'Filter Widget', navigate [here](/docs/blink-platform/dashboards/building-a-dashboard/widgets/filter)</Note>

  <Steps>
    <Step title="Choose the Filter Widget">
      Select 'Add Condition' under the filter section. The condition builder will appear.

      <Frame>
        <img src="https://mintcdn.com/blinkops-2/xnKigMZdVI45SQhn/img/Automations/FilterWidgetCondition.png?fit=max&auto=format&n=xnKigMZdVI45SQhn&q=85&s=81070f6c55e1034baad4e432286f70db" width="3450" height="2150" data-path="img/Automations/FilterWidgetCondition.png" />
      </Frame>
    </Step>

    <Step title="Define the Condition and Add Logical Operators">
      Apply the condition by applying the values and choose an operator from the dropdown menu that appears when you click on it.

      You can also create nested conditions, which are conditions grouped within other conditions. Nested conditions allow you to define more Advanced logic, applying specific operators (`AND`/`OR`) to a subset of conditions independently from the main set of conditions.

      <Frame>
        <img src="https://mintcdn.com/blinkops-2/jJLC0binSKMKUQ9N/img/Dashboards/ComplexConditionBuilder.png?fit=max&auto=format&n=jJLC0binSKMKUQ9N&q=85&s=28cad27a1eaef42ddaba57e23693d4dd" width="3446" height="2162" data-path="img/Dashboards/ComplexConditionBuilder.png" />
      </Frame>
    </Step>
  </Steps>
</Accordion>

***

## Condition Operators

The following condition operators can be used to create a condition statement:

<Note>**Note**: The list of available condition operators will vary depending on the type of input or data you are working with. For example, numeric fields may include operators like `greater than`, `less than` or `within`, while date/time fields provide options like before, after, or calendar-based selections such as `month`, `year`, or `quarter`. This ensures that only relevant operators are shown for each condition. </Note>

<CardGroup cols={3}>
  <Card title="Equals" icon="equals">
    `x = b`

    The condition is true when the left value is exactly `equal` to the right value.
  </Card>

  <Card title="Not Equals" icon="not-equal">
    `x != y`

    The condition is true when the left value `is not equal` to the right value.
  </Card>

  <Card title="Less than" icon="less-than">
    The condition is true when the `left value` is less than the right value.
  </Card>

  <Card title="Less Than or Equals To" icon="less-than-equal">
    The condition is true when the left value is `less than or equal` to the right value.
  </Card>

  <Card title="Greater Than" icon="greater-than">
    `x > y`

    The condition is true when the left value is `greater` than the right value.
  </Card>

  <Card title="Greater Than or Equals To" icon="greater-than-equal">
    `x >= y`

    The condition is true when the left value is `greater than or equal` to the right value.
  </Card>

  <Card title="Contains" icon="check">
    The condition is true when the left value `contains` the right value

    **Example**- a substring in a string or an item in a list.
  </Card>

  <Card title="Not Contains" icon="xmark">
    The condition is true when the left value `does not contain` the right value.
  </Card>

  <Card title="Starts With" icon={<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" color="#1f7ef2" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-down-az-icon lucide-arrow-down-a-z"><path d="m3 16 4 4 4-4"/><path d="M7 20V4"/><path d="M20 8h-5"/><path d="M15 10V6.5a2.5 2.5 0 0 1 5 0V10"/><path d="M15 14h5l-5 6h5"/></svg>}>
    The condition is true when the left value `starts with` the right value.
  </Card>

  <Card title="Ends With" icon={<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" color="#1f7ef2" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-arrow-up-az-icon lucide-arrow-up-a-z"><path d="m3 8 4-4 4 4"/><path d="M7 4v16"/><path d="M20 8h-5"/><path d="M15 10V6.5a2.5 2.5 0 0 1 5 0V10"/><path d="M15 14h5l-5 6h5"/></svg>}>
    The condition is true when the left value `ends` with the right value.
  </Card>

  <Card title="Regex Match" icon="asterisk">
    The condition is true when the left value `matches the specified Regular Expression pattern.`
  </Card>

  <Card title="Is Empty" icon="brackets-square">
    The condition is true when the left value `is empty or null.`

    This includes empty strings, arrays, objects, or a null value.
  </Card>

  <Card title="Is Not Empty" icon={<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" color="#1f7ef2" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-variable-icon lucide-variable"><path d="M8 21s-4-3-4-9 4-9 4-9"/><path d="M16 3s4 3 4 9-4 9-4 9"/><line x1="15" x2="9" y1="9" y2="15"/><line x1="9" x2="15" y1="9" y2="15"/></svg>} size={26}>
    The condition is true when the left value `is not empty or null.`

    This operator **does not** require a **right-hand** value.
  </Card>

  <Card title="Is True" icon="question">
    The condition is true when the left value is `true(boolean)`.

    This operator **does not** require a **right-hand** value.
  </Card>

  <Card title="Is False" icon="colon">
    The condition is true when the left value is `false(boolean)`.

    This operator **does not** require a **right-hand** value.
  </Card>
</CardGroup>

<Note>
  **Note**: When using the contains or not contains operators in the condition builder, if the field type is a list, the condition checks whether a specific item is present or absent within that list.

  * [contains](#contains): Returns true if the specified value is found as an item within the list.

  * [not contains](#not-contains): Returns true if the specified value is not found as an item within the list.
</Note>

***
