# Global Popup error

**URL:** <https://forum.inductiveautomation.com/t/global-popup-error/104112>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [March 24, 2025, 5:11pm UTC](https://forum.inductiveautomation.com/t/global-popup-error/104112 "2025-03-24T17:11:32Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![arice](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@arice](https://forum.inductiveautomation.com/u/arice)\
**Post date:** [March 24, 2025, 5:11pm UTC](https://forum.inductiveautomation.com/t/global-popup-error/104112/1 "2025-03-24T17:11:32Z")

</div>

I am trying to create a global popup(popup that comes up on any page when called). I have tried several methods but the most affective method i have so far is this. I have created a script on the startup of my home page that get the pageID and sets it to a memory tag. It looks like this:

```python
def runAction(self):
	PageLoaded = self.page.props.pageId
	tagPath = '[default]pageID'
	system.tag.writeBlocking(tagPath, PageLoaded)

```

I then created two custom session variables. One that is bound to the PageLoaded tag and another that is bound to a variable that I can change. On the variable that i can change i created a change script that runs an openPopup and uses the PageLoaded variable to set the pageId of the openPopup. The script looks like this:

```python
def valueChanged(self, previousValue, currentValue, origin, missedEvents):
	CurrentPage = self.custom.CurrentPage
	PopupPath = 'Pages/Menu/SettingMenu'
	system.perspective.openPopup("MyPopup", PopupPath, pageId = CurrentPage)

```

The popup comes up and works but I am getting this error in my logger and in my session designer:

`Error running property change script on session.custom.OpenPopup: Traceback (most recent call last): File "<function:valueChanged>", line 4, in valueChanged at com.inductiveautomation.perspective.gateway.script.AbstractScriptingFunctions.lambda$operateOnPage$0(AbstractScriptingFunctions.java:57) at com.inductiveautomation.perspective.gateway.script.AbstractScriptingFunctions.operateOnSession(AbstractScriptingFunctions.java:120) at com.inductiveautomation.perspective.gateway.script.AbstractScriptingFunctions.operateOnPage(AbstractScriptingFunctions.java:47) at com.inductiveautomation.perspective.gateway.script.PerspectiveScriptingFunctions.popupAction(PerspectiveScriptingFunctions.java:758) at com.inductiveautomation.perspective.gateway.script.PerspectiveScriptingFunctions.openPopup(PerspectiveScriptingFunctions.java:240) at jdk.internal.reflect.GeneratedMethodAccessor73.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Page "3075b2e2" not found.`

```python
com.inductiveautomation.ignition.common.script.JythonExecException
Traceback (most recent call last):
  File "<function:valueChanged>", line 4, in valueChanged
java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Page "3075b2e2" not found.

```

---

<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:** [March 24, 2025, 5:13pm UTC](https://forum.inductiveautomation.com/t/global-popup-error/104112/2 "2025-03-24T17:13:09Z")

</div>

Please edit your topic to use "Preformatted text" styling on your code and on the error details.

---

<div class="post-metadata">

**Author:** ![ryan.white](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ryan.white/32/73193_2.png) [@ryan.white](https://forum.inductiveautomation.com/u/ryan.white)\
**Post date:** [March 24, 2025, 5:13pm UTC](https://forum.inductiveautomation.com/t/global-popup-error/104112/3 "2025-03-24T17:13:35Z")

</div>

Please see [Wiki - how to post code on this forum](https://forum.inductiveautomation.com/t/wiki-how-to-post-code-on-this-forum/77831).

---

<div class="post-metadata">

**Author:** ![arice](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@arice](https://forum.inductiveautomation.com/u/arice)\
**Post date:** [March 24, 2025, 5:16pm UTC](https://forum.inductiveautomation.com/t/global-popup-error/104112/4 "2025-03-24T17:16:21Z")

</div>

Sorry im new to this. Is this better

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [March 24, 2025, 5:18pm UTC](https://forum.inductiveautomation.com/t/global-popup-error/104112/5 "2025-03-24T17:18:47Z")

</div>

> [@arice](#):
>
> File "function:valueChanged", line 4, in valueChanged  
> java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: **Page "3075b2e2" not found.**

(emphasis added)

You're attempting to target the PageID as in which Page the Popup should be opened over. However, that Page ID doesn't exist.

Are you trying to open a pop up in a different session? If not, you really do not need the PageID

---

<div class="post-metadata">

**Author:** ![arice](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@arice](https://forum.inductiveautomation.com/u/arice)\
**Post date:** [March 24, 2025, 5:20pm UTC](https://forum.inductiveautomation.com/t/global-popup-error/104112/6 "2025-03-24T17:20:10Z")

</div>

Essentially I am trying to have this popup come up on any page that I am on when a value changes.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [March 24, 2025, 5:22pm UTC](https://forum.inductiveautomation.com/t/global-popup-error/104112/7 "2025-03-24T17:22:40Z")

</div>

I don't think that you need to worry about the pageID in this case. Just call the `openPopup()` function without it. When it is not defined then the current page is used.

Is the custom property that the change script is on, a session prop?

---

<div class="post-metadata">

**Author:** ![arice](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@arice](https://forum.inductiveautomation.com/u/arice)\
**Post date:** [March 24, 2025, 5:24pm UTC](https://forum.inductiveautomation.com/t/global-popup-error/104112/8 "2025-03-24T17:24:54Z")

</div>

I agree when I read the documentation for openPopup it says that if I dont identify this then it will open in whatever page I am in. I have tried to not use the pageId and I get an error that says there is no pageId. I think the issue lies somewhere in the fact that I am doing this from a custom session variable but I am not sure why.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [March 24, 2025, 5:26pm UTC](https://forum.inductiveautomation.com/t/global-popup-error/104112/9 "2025-03-24T17:26:16Z")

</div>

What causes this value to change?

---

<div class="post-metadata">

**Author:** ![arice](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@arice](https://forum.inductiveautomation.com/u/arice)\
**Post date:** [March 24, 2025, 5:26pm UTC](https://forum.inductiveautomation.com/t/global-popup-error/104112/10 "2025-03-24T17:26:59Z")

</div>

Currently just me changing it in the Tag Browser but eventually it will be driven by a volume change.

---

<div class="post-metadata">

**Author:** ![arice](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@arice](https://forum.inductiveautomation.com/u/arice)\
**Post date:** [March 24, 2025, 5:28pm UTC](https://forum.inductiveautomation.com/t/global-popup-error/104112/11 "2025-03-24T17:28:15Z")

</div>

Here is the error i get when i take away the pageId:

```python
Traceback (most recent call last):
  File "<function:valueChanged>", line 4, in valueChanged
java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: No perspective page attached to this thread.

```

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [March 24, 2025, 5:29pm UTC](https://forum.inductiveautomation.com/t/global-popup-error/104112/12 "2025-03-24T17:29:00Z")

</div>

I assume you are running this in the Designer. What happens if you run it in the browser?

---

<div class="post-metadata">

**Author:** ![arice](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@arice](https://forum.inductiveautomation.com/u/arice)\
**Post date:** [March 24, 2025, 5:30pm UTC](https://forum.inductiveautomation.com/t/global-popup-error/104112/13 "2025-03-24T17:30:42Z")

</div>

i am running it simultaneously and changing it from the designer. In the browser if I put in the pageId then the popup does come up fine but i get the error in the logger and the designer.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [March 24, 2025, 5:40pm UTC](https://forum.inductiveautomation.com/t/global-popup-error/104112/14 "2025-03-24T17:40:08Z")

</div>

My point is that the Designer uses a "fake" or "moked" page, and so it doesn't behave the same as what a true session in a browser would.

I would not expect you to need a pageId in the browser at all.

The pageID is only needed if you are attempting to show the pop-up only on a specific page, and that would only matter if you happen to have multiple pages (tabs) open at once, or if you are attempting to open a popup on a remote session.

---

<div class="post-metadata">

**Author:** ![arice](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@arice](https://forum.inductiveautomation.com/u/arice)\
**Post date:** [March 24, 2025, 5:44pm UTC](https://forum.inductiveautomation.com/t/global-popup-error/104112/15 "2025-03-24T17:44:21Z")

</div>

Ok so as long as im not in read/write mode on the designer it should be ok?

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [March 24, 2025, 5:45pm UTC](https://forum.inductiveautomation.com/t/global-popup-error/104112/16 "2025-03-24T17:45:42Z")

</div>

I believe so, give it a try. If you still get an error, then show what that error is (use the details tab if you can).

---

<div class="post-metadata">

**Author:** ![arice](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@arice](https://forum.inductiveautomation.com/u/arice)\
**Post date:** [March 24, 2025, 5:51pm UTC](https://forum.inductiveautomation.com/t/global-popup-error/104112/17 "2025-03-24T17:51:21Z")

</div>

I created an input field on the screen so i can change this value and I still got an error in the logger. I then went and put back the pagId and no errors and it will open from any page so this seems to work as long as im not running the read write from the Designer.

---

<div class="post-metadata">

**Author:** ![arice](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@arice](https://forum.inductiveautomation.com/u/arice)\
**Post date:** [March 24, 2025, 5:55pm UTC](https://forum.inductiveautomation.com/t/global-popup-error/104112/18 "2025-03-24T17:55:02Z")

</div>

I guess the issue here is if I have more than one client open it only opens the popup in the first client.
