Search

User Manual

GETTING STARTED


MODULES AND PLATFORM


APPENDIX


TUTORIALS & HELPFUL TRICKS


GLOSSARY


STRATEGIC PARTNER LINKS

Sepasoft - MES Modules
Cirrus Link - MQTT Modules

RESOURCES

Inductive University
Ignition Demo Project
Knowledge Base Articles
Forum
IA Support
SDK Documentation
SDK Examples

ALL MANUAL VERSIONS

Ignition 8
Ignition 7.9
Ignition 7.8

Deprecated Pages

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


New_in
Version8.0.3



Scripting_function



Panel
titleDescription

Closes the Perspective Session with the given session ID 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 mobile app, the user is returned to the launch screen.



Panel
titleSyntax

system.perspective.closeSession(message, sessionId)

  • Parameters

String message - The message to display when the session closes. If omitted, the default message (set in the Project Properties) is shown. [optional]

String sessionId - Identifier of the session to be closed. If omitted, the current sessionId is used. [optional]

  • Returns

None

  • Scope

Perspective Session

close(message)

Additionally, if you can get the session object in a script, then you can call close() to close the session, optionally with a message. For more information, see Object Traversal.

  • Parameters

String message - The message to display when the session closes. If omitted, the default message (set in the Project Properties) is shown. [optional]

  • Returns

None

  • Scope

Perspective Session



Panel
titleCode Examples


Code Block
languagepy
titleCode Snippet
# Closes the session with the given sessionId.
system.perspective.closeSession('Your Session has ended.','2e1c98a8-182e-43ce-84e8-a71d441c2cce')
Code Block
languagepy
titleCode Snippet
# Closes the session with the sessionId retrieved from a component method.
# This can be called from any component in a view
session = self.view.session
session.close('This session is closing.')