# Always false even when the conditions are met

**URL:** <https://forum.inductiveautomation.com/t/always-false-even-when-the-conditions-are-met/73585>\
**Category:** Ignition\
**Created:** [May 11, 2023, 10:06am UTC](https://forum.inductiveautomation.com/t/always-false-even-when-the-conditions-are-met/73585 "2023-05-11T10:06:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lukas\_De\_Cleen](https://avatars.discourse-cdn.com/v4/letter/l/46a35a/32.png) [@Lukas\_De\_Cleen](https://forum.inductiveautomation.com/u/Lukas_De_Cleen)\
**Post date:** [May 11, 2023, 10:06am UTC](https://forum.inductiveautomation.com/t/always-false-even-when-the-conditions-are-met/73585/1 "2023-05-11T10:06:16Z")

</div>

Hey there, i am trying to figure out this problem. I have the following IF statement (see picture), but it keeps sending false even when the conditions are met. The TagPaht parameter is [default]_Rockwell PLC1 slot 11_/Program:BP\_Tank\_vullen/F56.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/b/9b8078469905260cd382d5c5aac358c5d27d02a7.png)

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [May 11, 2023, 10:19am UTC](https://forum.inductiveautomation.com/t/always-false-even-when-the-conditions-are-met/73585/2 "2023-05-11T10:19:06Z")

</div>

Close, you need &&, instead of &.

The single & is a bitwise AND operator, the double && is a logical opeator.

[https://docs.inductiveautomation.com/display/DOC81/Expression+Language+and+Syntax#ExpressionLanguageandSyntax-Operators](https://docs.inductiveautomation.com/display/DOC81/Expression+Language+and+Syntax#ExpressionLanguageandSyntax-Operators)

---

<div class="post-metadata">

**Author:** ![andreas](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/andreas/32/18981_2.png) [@andreas](https://forum.inductiveautomation.com/u/andreas)\
**Post date:** [May 11, 2023, 10:24am UTC](https://forum.inductiveautomation.com/t/always-false-even-when-the-conditions-are-met/73585/3 "2023-05-11T10:24:03Z")

</div>

Guess he also needs **tag** (tagpath), as he now is trying to check if a string is 1.

---

<div class="post-metadata">

**Author:** ![jonathan.taylor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jonathan.taylor/32/4048_2.png) [@jonathan.taylor](https://forum.inductiveautomation.com/u/jonathan.taylor)\
**Post date:** [May 11, 2023, 10:25am UTC](https://forum.inductiveautomation.com/t/always-false-even-when-the-conditions-are-met/73585/4 "2023-05-11T10:25:41Z")

</div>

True. But I would put that in a separate custom property so it can be an indirect binding rather than using the tag() expression function as that will be more performant

---

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [May 11, 2023, 1:09pm UTC](https://forum.inductiveautomation.com/t/always-false-even-when-the-conditions-are-met/73585/5 "2023-05-11T13:09:32Z")

</div>

Much better performance.

If I need to indirect something I will add a custom property somewhere, indirect bind to that and then bind to the property in an expression or script.

I think it's always best to avoid the tag function entirely.
