# How to force getSessionInfo to ignore the designer session?

**URL:** <https://forum.inductiveautomation.com/t/how-to-force-getsessioninfo-to-ignore-the-designer-session/112376>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [November 23, 2025, 7:09am UTC](https://forum.inductiveautomation.com/t/how-to-force-getsessioninfo-to-ignore-the-designer-session/112376 "2025-11-23T07:09:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roman\_Rozenshteyn](https://avatars.discourse-cdn.com/v4/letter/r/838e76/32.png) [@Roman\_Rozenshteyn](https://forum.inductiveautomation.com/u/Roman_Rozenshteyn)\
**Post date:** [November 23, 2025, 7:09am UTC](https://forum.inductiveautomation.com/t/how-to-force-getsessioninfo-to-ignore-the-designer-session/112376/1 "2025-11-23T07:09:43Z")

</div>

Hi all - I’ve tried just about everything and can’t seem to get the below scrip to ignore the designer session. Any help would be greatly appreciated.

```python
def valueChanged(tag, tagPath, previousValue, currentValue, initialChange, missedEvents):
	"""
	Tag change script (Gateway scope).
	Opens one 'Operator Prompt' popup per active Perspective page when the tag goes True.
	"""

	# Only act on rising edge and skip the initial subscription callback
	prev = bool(getattr(previousValue, 'value', previousValue))
	curr = bool(getattr(currentValue, 'value', currentValue))
	if initialChange or not curr or prev == curr:
		return

	popupIDBase = "my_popup"
	viewPath = "myPopup"
	title = "My Popup"

	try:
		# Get all active Perspective sessions for this gateway
		sessions = system.perspective.getSessionInfo() or []
		
		for s in sessions:
			# Skip Designer sessions (we only want runtime/browser/workstation)
			if s.get("sessionScope", "").lower() == "designer":
				continue

			sid = s.get("id")
			pageIds = s.get("pageIds") or []

			for pid in pageIds:
				popupID = "{}_{}".format(popupIDBase, pid) # one popup per page
				system.perspective.openPopup(
					id = popupID,
					view = viewPath,
					title = title,
					sessionId = sid, # required in Gateway scope
					pageId = pid # required in Gateway scope
				)
	except Exception as e:
		# Optional: log to the Gateway so you can see what went wrong
		system.util.getLogger("TagChange-PromptPopup").error("Failed to open popup(s): {}".format(e))

```

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [November 23, 2025, 10:04am UTC](https://forum.inductiveautomation.com/t/how-to-force-getsessioninfo-to-ignore-the-designer-session/112376/2 "2025-11-23T10:04:24Z")

</div>

There's a bug with that function…

> [@\[IGN-6238\] Designer session type changes from designer to browser](https://forum.inductiveautomation.com/t/ign-6238-designer-session-type-changes-from-designer-to-browser/60867):
>
> This session property that begins as designer when Designer is first opened changes to browser at some point. [image] It may have to do with connection loss and reconnect between Designer and Gateway. I noticed this when scripting startup actions to hide components EXCEPT in Designer where we want to see them for configuration. When this session property changes incorrectly to browser, closing Designer and reopening gets us back to correct designer property. Interestingly the gateway Perspect…

> [@\[Bug\] system.perspective.getSessionInfo() - Designer shows up as browser session scope](https://forum.inductiveautomation.com/t/bug-system-perspective-getsessioninfo-designer-shows-up-as-browser-session-scope/108558):
>
> I use system.perspective.getSessionInfo() to create a list of current users for a certain project. I have noticed that if I have the project open in a designer, it will show up as "designer" in the sessionScope key, which is correct. If I have the designer open, and I go to another plant location, somewhere along the way of dropping and reconnecting the network, the sessionScope no longer shows as "designer" but as "browser."
