# OR

### Description

Checks whether first argument or the second argument is *true*.

### Boolean OR Boolean

```java
Scalar<Boolean> OR Scalar<Boolean> : Scalar<Boolean>
Scalar<Boolean> OR GroupedScalar<Boolean> : GroupedScalar<Boolean>
GroupedScalar<Boolean> OR Scalar<Boolean> : GroupedScalar<Boolean>
GroupedScalar<Boolean> OR GroupedScalar<Boolean> : GroupedScalar<Boolean>
```

Comparing if one of Scalar\<Boolean> OR Scalar\<Boolean> is true. Returns a Scalar\<Boolean> with true when one of the terms result in true. Returns false when both terms are false.

If one argument is a Scalar, and the other one a GroupedScalar, then the operation is performed by taking the Scalar value and the value of each group value, which results another GroupedScalar (it has same group size, as the one from the input argument).

If both arguments are GroupedScalar, then the operation is performed by taking values with same group key, which  results in another Grouped Scalar (the group size is equal or smaller than the ones of the input arguments).

### Examples

Check if the PowerConsumption is greater 0 OR the PowerProduction is > 0. Only returns false if both are false.

```java
$Consumption > 0 OR $Production > 0
```


---

# 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://doc.moost.io/platform-manual/rules/rule-language/operations/or.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.
