# system.perspective.openPopup, sessionId Optional but puts logs and error

**URL:** <https://forum.inductiveautomation.com/t/system-perspective-openpopup-sessionid-optional-but-puts-logs-and-error/70436>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [February 28, 2023, 7:45pm UTC](https://forum.inductiveautomation.com/t/system-perspective-openpopup-sessionid-optional-but-puts-logs-and-error/70436 "2023-02-28T19:45:19Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![edward.fowler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/edward.fowler/32/24179_2.png) [@edward.fowler](https://forum.inductiveautomation.com/u/edward.fowler)\
**Post date:** [February 28, 2023, 8:33pm UTC](https://forum.inductiveautomation.com/t/system-perspective-openpopup-sessionid-optional-but-puts-logs-and-error/70436/3 "2023-02-28T20:33:26Z")

</div>

Ah, that makes sense, thanks @cmallonee.  
I found [Show a popup in perspective on all clients if a value changes - #30 by jlandwerlen](https://forum.inductiveautomation.com/t/show-a-popup-in-perspective-on-all-clients-if-a-value-changes/61133/30) and will dive into it.

This works.

```auto
popupId = "Test Popup"
		viewPath = "Test/Ted/Test Automatic Popup"
		logger = system.util.getLogger("Test Popup")
		logger.info("Testing popups.")
		sessions = system.perspective.getSessionInfo(projectFilter="ProjectX")
		for session in sessions:
			for pageId in session.pageIds:
				# logger.info("{0} | {1}".format(session.id, pageId))
				if currentValue.value:
					try:
						## Wrapped with 'try' because some sessions info productes errors:
						## - java.lang.IllegalArgumentException: Invalid UUID string: 066328F8
						system.perspective.openPopup(popupId, viewPath, sessionId=session.id, pageId=pageId)
					except:
						logger.info("system.perspective.openPopup failed: " + "{0} | {1}".format(session.id, pageId))
				else:
					try:
						## Wrapped with 'try' just incase it produces errors.
						system.perspective.closePopup(popupId, sessionId=session.id, pageId=pageId)
					except:
						logger.info("system.perspective.closePopup failed: " + "{0} | {1}".format(session.id, pageId))

```

---

_[View the full topic](https://forum.inductiveautomation.com/t/system-perspective-openpopup-sessionid-optional-but-puts-logs-and-error/70436)._
