Skip to main content
Version: 8.1

system.perspective.openPopup

This function is used in Python Scripting.

Description​

Open a popup view over the given page.

Syntax​

system.perspective.openPopup(id, view, [params], [title], [position], [showCloseIcon], [draggable], [resizable], [modal], [overlayDismiss], [sessionId], [pageId], [viewportBound])

Parameters​

TypeParameterDescription
StringidA unique popup string. Will be used to close the popup from other popup or script actions.
StringviewThe path to the View to use in the popup.
Dictionary[String, Any]paramsDictionary of key-value pairs to use as input parameters to the View. [optional]
StringtitleText to display in the title bar. Defaults to an empty string. [optional]
Dictionary[String, Integer]positionDictionary of key-value pairs to use for position. Possible position keys are: left, top, right, bottom, width, height. Defaults to the center of the window. [optional]
BooleanshowCloseIconShows the close icon if True. Defaults to True. [optional]
BooleandraggableAllows the popup to be dragged if True. Defaults to True. [optional]
BooleanresizableAllows the popup to be resized if True. Defaults to False. [optional]
BooleanmodalMakes the popup modal if True. A modal popup is the only view the user can interact with. Defaults to False. [optional]
BooleanoverlayDismissAllows the user to dismiss and close a modal popup by clicking outside of it if True. Defaults to False.[optional]
StringsessionIdIdentifier of the Session to target. If omitted, the current Session will be used automatically. [optional]
StringpageIdIdentifier of the Page to target. If omitted, the current Page will be used automatically. When targeting a different session, then this parameter must be included in the call. [optional]
BooleanviewportBound​
New in 8.1.3
If True, popups will be "shifted" to always open within the bounds of the viewport. If the popup would be larger than the viewport, then it will be resized to fit within the bounds. Default is False. [optional]

Returns​

Nothing

Scope​

Gateway, Perspective Session

note

This function will only work in the Gateway scope if both sessionId and pageId are supplied to the call.

Code Examples​

Code Snippet
# Opens a popup view. We are passing in two parameters, called "myParam" and "myParam2". We also set some additional properties of the popup.
system.perspective.openPopup("myPopupId",'folder/myView', params = {'myParam':1,'myParam2':'Test'}, showCloseIcon = False, resizable = True)
Code Snippet
# Opens a popup view. The top left corner of the popup will be 100 pixels from the left and top edges of the session.
system.perspective.openPopup('myPopupId', 'folder/myView', position = {'left':100,'top':100})