# OR Statements With Expression Tags

**URL:** <https://forum.inductiveautomation.com/t/or-statements-with-expression-tags/99352>\
**Category:** Ignition\
**Tags:** scripting, perspective\
**Created:** [December 3, 2024, 7:40am UTC](https://forum.inductiveautomation.com/t/or-statements-with-expression-tags/99352 "2024-12-03T07:40:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christopher\_Cooper1](https://avatars.discourse-cdn.com/v4/letter/c/9de053/32.png) [@Christopher\_Cooper1](https://forum.inductiveautomation.com/u/Christopher_Cooper1)\
**Post date:** [December 3, 2024, 7:40am UTC](https://forum.inductiveautomation.com/t/or-statements-with-expression-tags/99352/1 "2024-12-03T07:40:11Z")

</div>

Just wanted to explain a solution to a problem I was having with expression tags since I didn't already see a post on here\>

Let's say you have a group of tags that represent a group of conveyor lines, such as Conveyor1, Conveyor2, etc, and you want to be able to monitor if any of the conveyor lines is faulted. Instead of looking at each individual tag, you want to use one master tag, such as Any\_Conveyor\_Faulted.

Here is how you would do this:  
Create new expression tag \> data type is boolean, execution mode is event driven. Under expression, use this:  
{[~]FOLDER NAME/TAG\_NAME.value} || {[~]FOLDER NAME/TAG\_NAME.value}

Each tag path needs {} around it, and do not forget the .value at the end, or it does not work. Since ignition uses jython, the "or" and "OR" expressions from python do not appear to work, so using || is a good work around.

Hope this helped someone.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [December 3, 2024, 8:13am UTC](https://forum.inductiveautomation.com/t/or-statements-with-expression-tags/99352/2 "2024-12-03T08:13:26Z")

</div>

Welcome to the forum, Christopher. A couple of points:

> [@Christopher\_Cooper1](#):
>
> Since ignition uses jython, the "or" and "OR" expressions from python do not appear to work, so using || is a good work around.

Ignition uses Jython for **scripting**. Your  
`{[~]FOLDER NAME/TAG_NAME.value} || {[~]FOLDER NAME/TAG_NAME.value}`  
is an **expression** and follows the documented rules for [Expression Language and Syntax | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/platform/expression-language-and-syntax) (where you will find the _logical OR_ syntax documented). You can think of Ignition's expression language as being like a spreadsheet's functions.

> Expressions often involve one or more other values that are used to calculate a final value. In most cases, expressions only return a value.

In Excel you would use VBA (Visual Basic for Applications) for scripting and in Ignition it would be Jython.

For posting code here, please see [Wiki - how to post code on this forum](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831).

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [December 3, 2024, 1:00pm UTC](https://forum.inductiveautomation.com/t/or-statements-with-expression-tags/99352/3 "2024-12-03T13:00:05Z")

</div>

> [@Christopher\_Cooper1](#):
>
> Each tag path needs {} around it, and do not forget the .value

You do not need the `.value` as the value property is the default property. Just including the the tag path is enough as it will resolve to the value of the tag.
