Skip to main content
Version: 8.1

system.perspective.closeSession

This function is used in Python Scripting.

Description​

Closes the Perspective Session with the given sessionID or the current Session if no ID is provided. If a message is provided, it is displayed on the page when the Session closes. Otherwise the default message (set in the Project properties) is displayed.

note

In the Perspective App, the user is returned to the launch screen.

Syntax​

system.perspective.closeSession([message], [sessionId])

Parameters​

TypeParameterDescription
StringmessageThe message to display when the Session closes. If omitted, the default message (set in the Project properties) is shown. [optional]
StringsessionIdIdentifier of the Session to be closed. If omitted, the current sessionId is used. [optional]

Returns​

Nothing

Scope​

Gateway, Perspective Session

note

This function will only work in the Gateway scope if sessionId is supplied to the call.

Code Examples​

Code Snippet
# Closes the Session with the given sessionId.
system.perspective.closeSession('Your Session has ended.','2e1c98a8-182e-43ce-84e8-a71d441c2cce')

Keywords​

system perspective closeSession, perspective.closeSession