# Icon visible in perspective

**URL:** <https://forum.inductiveautomation.com/t/icon-visible-in-perspective/84536>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [January 21, 2024, 4:03pm UTC](https://forum.inductiveautomation.com/t/icon-visible-in-perspective/84536 "2024-01-21T16:03:06Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vinodhini\_N](https://avatars.discourse-cdn.com/v4/letter/v/65b543/32.png) [@Vinodhini\_N](https://forum.inductiveautomation.com/u/Vinodhini_N)\
**Post date:** [January 21, 2024, 4:03pm UTC](https://forum.inductiveautomation.com/t/icon-visible-in-perspective/84536/1 "2024-01-21T16:03:06Z")

</div>

I created a memory tag and assigned a value as 2. And added a icon component in view. If i change the value to 1 icon should not visible. Then again i change the value to 2 after 5 mins the icon should visible how can i do this? Can u explain it clearly? Where should i bind the value to the property and condition for the script in perspective?

---

<div class="post-metadata">

**Author:** ![Vinodhini\_N](https://avatars.discourse-cdn.com/v4/letter/v/65b543/32.png) [@Vinodhini\_N](https://forum.inductiveautomation.com/u/Vinodhini_N)\
**Post date:** [January 21, 2024, 4:13pm UTC](https://forum.inductiveautomation.com/t/icon-visible-in-perspective/84536/2 "2024-01-21T16:13:46Z")

</div>

Hello. I have a doubt in icon visibility. Created a memory tag and assigned a value as 2. Added a icon in view. If i change the value to 1 thr icon should disable. Again if i change the value to 2 after 5 mins the icon should visible. How it is possible? Can u please explain step by stepy

---

<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:** [January 21, 2024, 4:27pm UTC](https://forum.inductiveautomation.com/t/icon-visible-in-perspective/84536/3 "2024-01-21T16:27:38Z")

</div>

You control the icon's visibility using the `META.visible` property in the Perspective Property Editor.

I'm offering a very simple solution1 which looks at your memory tag's timestamp which is the time at which the value last changed.

First step: make the icon appear 3 s after the memory tag value changes. I'm using tag `IntMemory`.

- Select the icon and find the `META.visible` property in the Perspective Property Editor.
- Click in the left gutter and add an Expression Binding (using your tag name instead of `IntMemory`).

```auto
now(1000) - {[default]IntMemory.Timestamp} > 3000 // ms.

```

- Apply that binding and test. If you change your memory tag the icon should disappear and return in 3 s. Notes:
- That the expression just returns a `true` or `false` for the visible property.
- The 1000 in `now()` makes the function re-evaluate every 1000 ms.

Second step: modify so that it only appears when IntMemory = 2.  
Change the expression to,

```auto
{[default]IntMemory} = 2
&&
now(1000) - {[default]IntMemory.Timestamp} > 3000 // ms.

```

* * *

1 This method will be suitable for many applications but be aware that anything that resets timestamps (gateway restart or OPC server and possibly PLC) will update the timestamp and, in this example, the component will be invisible until the timer resets. A more robust solution would require creating a tag of type DateTime to store the time of the tag value change.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 21, 2024, 4:28pm UTC](https://forum.inductiveautomation.com/t/icon-visible-in-perspective/84536/4 "2024-01-21T16:28:17Z")

</div>

Double posting is against [this forum's rules](https://forum.inductiveautomation.com/faq). I moved your repeat here.

It is also inappropriate to ping or otherwise try to gain additional attention very soon after a post. This a a forum of volunteers, with volunteer time-frames for responses. Wait at least a day, or more on weekends.

{ I also changed the category to Ignition. Choosing an appropriate category for a topic helps get the right eyes on your question. Choosing a good tag is not enough. }

---

<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:** [January 21, 2024, 4:33pm UTC](https://forum.inductiveautomation.com/t/icon-visible-in-perspective/84536/5 "2024-01-21T16:33:34Z")

</div>

This is actually your [third question](https://forum.inductiveautomation.com/t/icon-visibility-and-alert-message/84094/2) on the topic which I didn't realise when I answered and you already have an answer to the first that gave you some good clues how to solve the problem.

There is a pencil icon below each of your questions to allow you to edit a post. Please do this to improve a question rather than post a nearly identical one.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 21, 2024, 4:41pm UTC](https://forum.inductiveautomation.com/t/icon-visible-in-perspective/84536/6 "2024-01-21T16:41:59Z")

</div>

> [@Transistor](#):
>
> ` > 3000`

~~Probably want ` < 3000`.~~ Whoops. No. Use `> 300000` for five minutes of invisibility.

---

<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:** [January 21, 2024, 4:49pm UTC](https://forum.inductiveautomation.com/t/icon-visible-in-perspective/84536/7 "2024-01-21T16:49:15Z")

</div>

I know - I mentioned 3 s in the post. I'm just not going to wait 5 minutes to debug my code!

---

<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:** [February 14, 2024, 5:45am UTC](https://forum.inductiveautomation.com/t/icon-visible-in-perspective/84536/9 "2024-02-14T05:45:48Z")

</div>

I don't understand what you have written. Please edit the post and add punctuation so that I know where each sentence starts and ends. Then explain how this is related to the original question.
