> For the complete documentation index, see [llms.txt](https://docs.valq.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.valq.com/model/formula-functions/logical-functions/or.md).

# OR

An OR statement returns TRUE if at least one of the conditions is TRUE and returns FALSE when all the conditions evaluate to FALSE.

### Syntax

OR(logical\_test1, ...logical\_test2?)

### Arguments

<table><thead><tr><th width="158.93969144460027">Arguments</th><th width="170">Datatype</th><th width="448">Descriptions</th></tr></thead><tbody><tr><td>logical_test1</td><td>Node reference,Number</td><td>The first condition to be evaluated. This is a required argument.</td></tr><tr><td>logical_test2?</td><td>Node reference,Number</td><td>The additional conditions to be evaluated. These are optional arguments.</td></tr></tbody></table>

### Return Value

Either True or False values that are given in the arguments.

### Remarks

OR function accepts multiple conditions.

### Example

Consider the below scenario in which if the Sales Quantity is greater than 50 **or** the usage Customer Ranking is 1, the price should be $20 else $25.

<table><thead><tr><th width="125">Periods</th><th align="center">Jan</th><th align="center">Feb</th><th align="center">Mar</th><th align="center">Apr</th><th align="center">May</th><th align="center">Jun</th></tr></thead><tbody><tr><td><mark style="color:purple;">Sales Quantity</mark> </td><td align="center">50</td><td align="center">55</td><td align="center">45</td><td align="center">65</td><td align="center">25</td><td align="center">31</td></tr><tr><td><mark style="color:orange;">Customer Ranking</mark></td><td align="center">1</td><td align="center">1</td><td align="center">2</td><td align="center">2</td><td align="center">1</td><td align="center">2</td></tr></tbody></table>

To achieve this, the following formula should be written in the \[Price] node:

<mark style="color:blue;">**`IF`**</mark>**`(`**<mark style="color:blue;">**`OR`**</mark>**`(`**<mark style="color:purple;">**`[Sales Quantity]`**</mark>**`>50,`**<mark style="color:orange;">**`[Customer Ranking]`**</mark>**`==1),20,25)`**

### Result

<table><thead><tr><th width="129">Parameter</th><th align="center">Jan</th><th align="center">Feb</th><th align="center">Mar</th><th align="center">Apr</th><th align="center">May</th><th align="center">Jun</th></tr></thead><tbody><tr><td>Price</td><td align="center">20</td><td align="center">20</td><td align="center">25</td><td align="center">20</td><td align="center">20</td><td align="center">25</td></tr></tbody></table>

As you can see from the above table, the result will be 20 even if one of the conditions is true and it will be 25 only when both of the conditions are false. In Feb, both of the conditions are True & in Jan, Apr and May one of the conditions is true. So the result is 20. But in Mar both the conditions are false, so the result is 25.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.valq.com/model/formula-functions/logical-functions/or.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
