# Tag change open a popup in Perspective?

**URL:** <https://forum.inductiveautomation.com/t/tag-change-open-a-popup-in-perspective/115824>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [June 3, 2026, 9:21am UTC](https://forum.inductiveautomation.com/t/tag-change-open-a-popup-in-perspective/115824 "2026-06-03T09:21:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![taohongyu88](https://avatars.discourse-cdn.com/v4/letter/t/f05b48/32.png) [@taohongyu88](https://forum.inductiveautomation.com/u/taohongyu88)\
**Post date:** [June 3, 2026, 9:21am UTC](https://forum.inductiveautomation.com/t/tag-change-open-a-popup-in-perspective/115824/1 "2026-06-03T09:21:54Z")

</div>

Ignition Version : 8.1.24 Perspective

I add a project Library.

`# messageBox def messageBox(title,message,sessionId=None,pageId=None): system.perspective.openPopup("messageBox",'Popup/messageBox', title=title,params = {'message':message}, showCloseIcon = True, resizable = True,modal=True,sessionId=sessionId, pageId=pageId)`

I have a tag , when it change from False to True, show a messageBox in Perspectvie.

I try on btn to show messgebox , It's ok.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/5/d554029bd4b8d10616a5e3b19e547f3a98c3b9e0.png)

I try on Gateway - Tag change script, it can't show.

I try on Tag - Value change script , it can't show.

How to show in Perspective?

---

<div class="post-metadata">

**Author:** ![JVDM](https://avatars.discourse-cdn.com/v4/letter/j/ac8455/32.png) [@JVDM](https://forum.inductiveautomation.com/u/JVDM)\
**Post date:** [June 3, 2026, 9:52am UTC](https://forum.inductiveautomation.com/t/tag-change-open-a-popup-in-perspective/115824/2 "2026-06-03T09:52:49Z")

</div>

As @pturmel said in [this thread](https://forum.inductiveautomation.com/t/i-want-to-open-a-popup-when-the-value-of-the-perspective-tag-is-changed/70878)

> [@I want to open a popup when the value of the Perspective tag is changed](https://forum.inductiveautomation.com/t/i-want-to-open-a-popup-when-the-value-of-the-perspective-tag-is-changed/70878/2):
>
> Bind the tag to a custom property in the session or view where you want the popup. Add a change script to that property. Do not use a gateway tag change or tag value change for UI operations.

---

<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:** [June 3, 2026, 1:07pm UTC](https://forum.inductiveautomation.com/t/tag-change-open-a-popup-in-perspective/115824/3 "2026-06-03T13:07:19Z")

</div>

The most convenient place to do this is in a shared docked view for the entire project. The change event on one of its custom properties, bound to the tag, will have the context needed to unconditionally open a popup.

---

<div class="post-metadata">

**Author:** ![taohongyu88](https://avatars.discourse-cdn.com/v4/letter/t/f05b48/32.png) [@taohongyu88](https://forum.inductiveautomation.com/u/taohongyu88)\
**Post date:** [June 3, 2026, 1:38pm UTC](https://forum.inductiveautomation.com/t/tag-change-open-a-popup-in-perspective/115824/4 "2026-06-03T13:38:19Z")

</div>

In Version 8.1.24:

I try left menu add a custom property，bind to a tag;

I add change script in it.

But the popup also can't show .

```python
def valueChanged(self, previousValue, currentValue, origin, missedEvents):
        if previousValue is None:
            return
        # 只在False→True上升沿弹窗
        system.perspective.print('valueChanged.....')
        # 8.1.24 必须手动从self提取sessionId和pageId，否则sendMessage丢失上下文
        sessionId = self.session.props.id
        system.perspective.print(str(sessionId))
        pageId = self.page.props.pageId
        system.perspective.print(str(pageId))
        if previousValue.value == False and currentValue.value == True:
            system.perspective.print('false----true')
            projectDef.messageBox(u'tip', u'msg',sessionId=sessionId,pageId=pageId)

```

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

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

---

<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:** [June 3, 2026, 1:41pm UTC](https://forum.inductiveautomation.com/t/tag-change-open-a-popup-in-perspective/115824/5 "2026-06-03T13:41:30Z")

</div>

Do not provide session ID or page ID when opening a popup from within a page context. (Also, show us the real call to `system.perspective.openPopup()`, not just a call to a library function that is "understood" to do it for you.)

---

<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:** [June 3, 2026, 1:56pm UTC](https://forum.inductiveautomation.com/t/tag-change-open-a-popup-in-perspective/115824/6 "2026-06-03T13:56:36Z")

</div>

I just did it this way on a project. I'm glad to hear that is considered a good way to do it 🙂

---

<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:** [June 3, 2026, 2:29pm UTC](https://forum.inductiveautomation.com/t/tag-change-open-a-popup-in-perspective/115824/7 "2026-06-03T14:29:37Z")

</div>

> [@Steve\_Laubach](#):
>
> a good way to do it

I am biased toward UI tag bindings rather than messaging. Script in one place instead of two, and the "send" side is handled purely in java infrastructure.
