# Info expression

**URL:** <https://forum.inductiveautomation.com/t/info-expression/18665>\
**Category:** Ignition\
**Created:** [June 29, 2018, 7:33am UTC](https://forum.inductiveautomation.com/t/info-expression/18665 "2018-06-29T07:33:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gary.bizzotto](https://avatars.discourse-cdn.com/v4/letter/g/f6c823/32.png) [@gary.bizzotto](https://forum.inductiveautomation.com/u/gary.bizzotto)\
**Post date:** [June 29, 2018, 7:33am UTC](https://forum.inductiveautomation.com/t/info-expression/18665/1 "2018-06-29T07:33:27Z")

</div>

Who can help me to create an expression,  
I want create an expression where one tag return true and another tag return false like this:  
IF A = true then  
out := true  
endif  
if B = true then  
out := false  
endif

Thankyou

---

<div class="post-metadata">

**Author:** ![Sanderd17](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sanderd17/32/8735_2.png) [@Sanderd17](https://forum.inductiveautomation.com/u/Sanderd17)\
**Post date:** [June 29, 2018, 7:44am UTC](https://forum.inductiveautomation.com/t/info-expression/18665/2 "2018-06-29T07:44:28Z")

</div>

```auto
if({tagpathA}, 1,
if({tagpathB}, 0,
               xxx))

```

with `xxx` whatever you want in the other case (A and B false).

---

<div class="post-metadata">

**Author:** ![gary.bizzotto](https://avatars.discourse-cdn.com/v4/letter/g/f6c823/32.png) [@gary.bizzotto](https://forum.inductiveautomation.com/u/gary.bizzotto)\
**Post date:** [June 29, 2018, 7:58am UTC](https://forum.inductiveautomation.com/t/info-expression/18665/3 "2018-06-29T07:58:26Z")

</div>

Is possible without the third option and takeout xxx only this:  
if({tagpathA}, 1,  
if({tagpathB}, 0))

---

<div class="post-metadata">

**Author:** ![Sanderd17](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/sanderd17/32/8735_2.png) [@Sanderd17](https://forum.inductiveautomation.com/u/Sanderd17)\
**Post date:** [June 29, 2018, 8:20am UTC](https://forum.inductiveautomation.com/t/info-expression/18665/4 "2018-06-29T08:20:50Z")

</div>

No, you need a third option. Even if A and B false can never happen, you still need to add an “else” for the second if.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [June 29, 2018, 2:30pm UTC](https://forum.inductiveautomation.com/t/info-expression/18665/5 "2018-06-29T14:30:43Z")

</div>

You could also do it all inline, with no if statements:  
`{path/to/tag1} && !{path/to/tag2}`
