# "OR" in animation

**URL:** <https://forum.inductiveautomation.com/t/or-in-animation/41532>\
**Category:** Ignition\
**Tags:** vision, ignition79\
**Created:** [December 15, 2020, 4:14pm UTC](https://forum.inductiveautomation.com/t/or-in-animation/41532 "2020-12-15T16:14:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![philippeg](https://avatars.discourse-cdn.com/v4/letter/p/e495f1/32.png) [@philippeg](https://forum.inductiveautomation.com/u/philippeg)\
**Post date:** [December 15, 2020, 4:14pm UTC](https://forum.inductiveautomation.com/t/or-in-animation/41532/1 "2020-12-15T16:14:36Z")

</div>

hello, sorry for the “easy” topic but I’m new with the package and I have 2 BOOLEAN tags declared as such and I’m trying to do a FILL animation based on the OR Condition of the two tags, and honestly I do not know where to start… Any help would be appreciated …  
thanks  
Phil

---

<div class="post-metadata">

**Author:** ![bpreston](https://avatars.discourse-cdn.com/v4/letter/b/4af34b/32.png) [@bpreston](https://forum.inductiveautomation.com/u/bpreston)\
**Post date:** [December 15, 2020, 4:22pm UTC](https://forum.inductiveautomation.com/t/or-in-animation/41532/2 "2020-12-15T16:22:12Z")

</div>

I’m assuming your using an expression. If so then your expression would be something like:

```auto
bool1 || bool2

```

If we knew more about where your trying to use it then it would be easier to say. Also if your doing it from an expression binding, on the right side, you have 4 icons. These icons are for properties, tags, operators and functions. For or you would look under operators then logical and it would describe it. The icon for operators is shown as ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/6/e6f3a91c5fba86d40ba155040e9d98ea2a81e9a8.png) .

---

<div class="post-metadata">

**Author:** ![philippeg](https://avatars.discourse-cdn.com/v4/letter/p/e495f1/32.png) [@philippeg](https://forum.inductiveautomation.com/u/philippeg)\
**Post date:** [December 15, 2020, 5:05pm UTC](https://forum.inductiveautomation.com/t/or-in-animation/41532/3 "2020-12-15T17:05:39Z")

</div>

Hello, thanks for the reply, that is actually exactly what I did but what happen is that the following error pops up “The type of this expression ( **Boolean** ) is not assignment-compatible  
with the type of the property you are binding to ( **Color** )” which is really strange because if I assign a single TAG which is a BOOLEAN anyway it does works  
thanks  
Phil

---

<div class="post-metadata">

**Author:** ![robertm](https://avatars.discourse-cdn.com/v4/letter/r/ea5d25/32.png) [@robertm](https://forum.inductiveautomation.com/u/robertm)\
**Post date:** [December 16, 2020, 3:32pm UTC](https://forum.inductiveautomation.com/t/or-in-animation/41532/4 "2020-12-16T15:32:05Z")

</div>

Probably because Color is expecting a palette value, not a boolean, and a single tag evaluates to a 0 or 1.

I would use the custom properties and Styles to do this. On the object, create a custom property…Name it something that makes sense like MyFillColor, make it type Boolean. In the bindings of this new property, add the expression of your Boolean tags. Then in the Styles, use this new custom property to drive the visualization of your object.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [December 16, 2020, 8:30pm UTC](https://forum.inductiveautomation.com/t/or-in-animation/41532/5 "2020-12-16T20:30:44Z")

</div>

Instead of using magic colours as you need to use in styles, I would be creating a “library” of colours defined in client tags and bind to these. These should be string types and you can either set them to the hex colour `#193939` or the rgb colour `rgb(123,234,213)`

Your expression would then become:

```auto
if(bool1 || bool2
 , {[Client]Styles/Colours/Folder/colour1} 
 , {[Client]Styles/Colours/Folder/colour2}
) 

```

---

<div class="post-metadata">

**Author:** ![philippeg](https://avatars.discourse-cdn.com/v4/letter/p/e495f1/32.png) [@philippeg](https://forum.inductiveautomation.com/u/philippeg)\
**Post date:** [December 16, 2020, 8:48pm UTC](https://forum.inductiveautomation.com/t/or-in-animation/41532/6 "2020-12-16T20:48:55Z")

</div>

thanks

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [December 16, 2020, 8:53pm UTC](https://forum.inductiveautomation.com/t/or-in-animation/41532/7 "2020-12-16T20:53:03Z")

</div>

I updated my reply with an example expression
