Hi, the code below results in an invalid UUID error.
popupId = "3Ed23lNx"
viewPath = "Page/Popups/warnings/warningsReminders/warningReminderBp" # insert your view path here
logger = system.util.getLogger("POPUP")
sessions = system.perspective.getSessionInfo(projectFilter="Production")
pageParams = {
'areaName':'',
'description':'Instrument Air Pressure Low: \n Below 350 KPa',
'popupID': popupId,
'title': "Instrument Air Pressure Low Warning"
}
for session in sessions:
for pageId in session.pageIds:
logger.info("{0} | {1}".format(session.id, pageId))
if currentValue.value:
system.perspective.openPopup(id=popupId, view=viewPath, params=pageParams, sessionId=session.id, pageId=pageId)
else:
# note no viewPath or param arg
system.perspective.closePopup(id=popupId, sessionId=session.id, pageId=pageId)
Error Code:
Error executing script.
Traceback (most recent call last):
File "<tagevent:valueChanged>", line 26, in valueChanged
at java.base/java.util.UUID.fromString1(Unknown Source)
at java.base/java.util.UUID.fromString(Unknown Source)
at com.inductiveautomation.perspective.gateway.script.AbstractScriptingFunctions.getSession(AbstractScriptingFunctions.java:91)
at com.inductiveautomation.perspective.gateway.script.AbstractScriptingFunctions.operateOnSession(AbstractScriptingFunctions.java:118)
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.closePopup(PerspectiveScriptingFunctions.java:258)
at jdk.internal.reflect.GeneratedMethodAccessor550.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: Invalid UUID string: D7183798
Any assistance would be appreciated.
Thank you.