# Logic

The **Logic** node is a powerful feature of the flow editor. It can be used to perform complex conditional logic which determines the flow's execution path.

## Options

### Rules

#### Left expression

This represents the value or variable being compared on the left side of the comparison operator. The value can be any data type or expression.

#### Operator

This is the value that is used to perform the comparison between the left and right expressions. The operator can be one of the following:

* equals
* does not equal
* in
* is not in
* greater than
* less than
* greater than or equal to
* less than or equal to

#### Right expression

This represents the value or variable that is being compared on the right side of the comparison operator. The value can be any data type or expression. For some operators like "in" or "is not in", the right expression is expected to be a string or list.

### Group Operator

This is the operator that is used to combine multiple comparison statements. It can be either "AND" or "OR".

<table><thead><tr><th width="161.5">Option</th><th>Description</th></tr></thead><tbody><tr><td>AND</td><td>All the individual comparison statements must be <code>true</code> for the overall comparison to be true.</td></tr><tr><td>OR</td><td>At least one of the individual comparison statements must be <code>true</code> for the overall comparison to be true.</td></tr></tbody></table>

## Output

Returns the current dataset.

## Helpful tips

* Logic nodes can be chained together to perform **If, else if, else if, else** logic.


---

# 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.alphi.dev/nodes/logic.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.
