# How do I do an if expression in perspective?

**URL:** <https://forum.inductiveautomation.com/t/how-do-i-do-an-if-expression-in-perspective/92032>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [June 18, 2024, 3:34pm UTC](https://forum.inductiveautomation.com/t/how-do-i-do-an-if-expression-in-perspective/92032 "2024-06-18T15:34:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mitchell\_Gerber](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@Mitchell\_Gerber](https://forum.inductiveautomation.com/u/Mitchell_Gerber)\
**Post date:** [June 18, 2024, 3:34pm UTC](https://forum.inductiveautomation.com/t/how-do-i-do-an-if-expression-in-perspective/92032/1 "2024-06-18T15:34:00Z")

</div>

This is what I have but it will not work as intended.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/2/026e3ab68e254a76d8afe7a4e816214c2cdb6b58.png)

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [June 18, 2024, 3:46pm UTC](https://forum.inductiveautomation.com/t/how-do-i-do-an-if-expression-in-perspective/92032/2 "2024-06-18T15:46:31Z")

</div>

Next time post your code using preformatted text. Use an expression binding on your `meta.visible` property set to this:

```python
if({[default]tagname} = 1, 0, 1)

```

but even better would be:

```python
!{[default]tagname}

```

---

<div class="post-metadata">

**Author:** ![Mitchell\_Gerber](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@Mitchell\_Gerber](https://forum.inductiveautomation.com/u/Mitchell_Gerber)\
**Post date:** [June 18, 2024, 3:49pm UTC](https://forum.inductiveautomation.com/t/how-do-i-do-an-if-expression-in-perspective/92032/3 "2024-06-18T15:49:04Z")

</div>

Thanks!
