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

Skip to end of metadata
Go to start of metadata


In Perspective, events and actions are some of the fundamental building blocks of project functionality. Actions give you the ability to respond to specific user inputs (e.g. mouse, keyboard, and touch inputs), as well as broad session events (like the beginning and end of the session) in many different ways. Thus, actions are our response to events.

Example uses for events and actions include:

  • Navigating to a new page when the user presses a button
  • Opening a popup containing details on a specific PLC when a user double-clicks on it in a diagram
  • Logging the user out of the session when they press Ctrl + L on the keyboard.
  • Scanning a barcode from a mobile device, and sending it to the Gateway.

In this section, we'll cover the basics on how to configure actions and events to suit your project's needs. 

Configuring Events and Actions

To configure an event and action on a component:

  1. Select the component.
  2. Right click on the component, and select Configure Events



  3. Choose an event from the left hand side. Note that you can configure actions for as many events as you'd like, but you'll need to configure the actions separately for each one.



  4. Choose one or more actions to associate with the event, by clicking the Add  icon.
    • The actions are run in order from top to bottom, and you can rearrange them using the Up Arrow  and Down Arrow  icons.
    • If you want to delete an action, use the Delete  icon.



  5. Configure the actions as you'd like. See the Actions section below for details on the properties you'll find for each action.

On this page ...


IULocgo


Events and Actions


Perspective Events

Perspective offers a wide range of possible events, but in this section we'll highlight a few common ones. You can find details on all configurable events at Perspective Event Types Reference.

Component Events

Many components have their own events, which are related directly to the functionality of the component. For a full list of components with configurable component events, see Perspective Event Types Reference.

System Events

  • onStartup events occur when the View or component is loaded into the session. For example, if you configure an onStartup event on a component, the event will occur when the view it is on is opened.
  • onShutdown events occur when the View or component is removed from the session. Typically this will occur when you navigate away from the View containing the component, or if the session times out.

Mouse Events

  • onClick events occur when the user clicks on any of their mouse's buttons, while the cursor is hovered over the component.
  • onContextMenu events occur when the user clicks the mouse button associated with a context menu (typically the right mouse button, on a two-button mouse).
  • onMouseOver events occur when the mouse pointer enters the component's borders. 

Keyboard Events

  • onKeyUp events occur when a key on the keyboard is released, while the component is focused.
  • onKeyPress events will be run repeatedly, while a key is held down and the component is focused.

Wheel Events

  • onWheel events occur when a user moves the scroll wheel while hovered over the component.


Basic Action Types

Each Event can have actions assigned to them, and each Action has some specific purpose. Each event can have any number of actions, and different types of actions can do different things. 

Each Action is called in order from top to bottom. To control this execution order, you can reorder the list of Actions using the Up Arrow  and Down Arrow  icons next to the list. However, Actions are not executed synchronously: sequential actions do not wait for any prior Actions to finish executing before running. Thus, if Action 1 is a long-running script, while Action 2 is quick to finish, it is possible that Action 2 will finish before Action 1.

Alter Logging Action

Perspective sessions log their session activity and errors to the logs of the browser they run in. Alter Logging allows us to change how verbose this logging is. This is useful for session debugging.

Action PropertyDescription
Remote Logging Enabled

Indicates whether the browser logs should also be sent to the Gateway to log in the Gateway logs. Note that for all messages to be visible, the Perpective.Client logger must be set to the same logging level as the level indicated in this action.

Set Logging Level

Dictates how verbose the session's logging should be. A logging level of all (or trace) shows all possible records, while a level of off shows none. Options are:

  • all
  • trace
  • debug
  • info
  • warn
  • error
  • fatal
  • off



Dock Action

Allows you to open or close a docked view. The view must be configured as docked in the Page Configuration section of the designer, and must be configured with a dock ID. The dock ID can be whatever you'd like. We'll need it here in order to run the action.

Action PropertyDescription
Dock Action

There are three types of dock actions:

  • Open: Opens the docked view.
  • Close: Closes the docked view.
  • Toggle: Toggles the state of the docked view, so opens the view if it currently closed, or closes it when it is currently open.
IdentifierThe ID of the docked view. Dock ID values can be set when you configure a view as docked.
ParametersParameters that can be passed into the docked view. The name of the parameters must match the name of the view parameters that are already set up.


IULocgo


Dock Action

Login/Logout Actions

Logs the current user in or out of the session.

Navigation Action

The Navigation action allows you to navigate to different views, pages, or URLs from an event.

The Navigation action has several modes. Each mode allows for a different type of navigation, and different options. The types of navigation are:

TypeDescription
Page

Navigates to a separate page.

  • Set Page: A string denoting the page URL of the target page.
  • Enabled: Specifies whether the action should be used or ignored.
  • Open in new tab: Specifies whether the newly opened page should replace the current page, or open in a new browser tab.
View

Replaces the current main View with a new main View.

  • Select View: The path to the view that should be used.
  • Parameters: A set of parameters to pass to the view. Add or remove parameters with the Add icon and Delete icon. In the Value field for a given parameter, you can pass in a path to a property value using the Parameter icon.
  • Enabled: Specifies whether the action should be used or ignored.
URL

Navigates to an external web address. 

  • Enter Url: The URL that the action should navigate to.
  • Enabled: Specifies whether the action should be used or ignored.
  • Open in new tab: Specifies whether the newly opened page should replace the current page, or open in a new browser tab.




IULocgo


Login and Logout Actions



IULocgo


Navigation Action


Popup Action

Opens a view as a popup, or closes an existing popup.


Action PropertyDescription
Popup Action
  • Open: Opens a view as a popup.
  • Close: Closes an existing popup.
  • Toggle: Opens a popup if it isn't open, and closes the popup if it is open.
Select View

The path to the view that should appear as a popup.

Parameters

A set of parameters to pass to the view. Add or remove parameters with the Add icon and Delete icon. In the Value field for a given parameter, you can pass in a path to a property value using the Parameter icon.

IdentifierA string that specifies a unique popup identity. If you want to close an open popup from a popup action, you'll need to supply the identifier that was used to open it.

Title

A string of text to display in the titlebar. If omitted, no titlebar is used.
Show close buttonA boolean indicating if a Close Icon should be displayed on the popup.

Draggable

A boolean indicating if the popup should be able to be dragged to new positions.

Resizable

A boolean indicating if the popup is allowed to be resized.

Modal

A boolean indicating if the popup should be modal, meaning it is the only view the user can interact with while open.

Background dismissable

A boolean indicating if the popup can be dismissed by clicking outside of it. This setting is only applied if the modal option is enabled. If omitted, defaults to false.
EnabledSpecifies whether the action should be used or ignored.

This feature is new in Ignition version 8.0.6
Click here to check out the other new features


As of 8.0.6, Perspective Popup Actions can be set to use Exact Positioning, or Relative Positioning. Relative allows the popup to be positioned based off of the mouse cursor position when used with a Mouse Event.

Action PropertyDescription

Position Exact

Exact Positioning controls where in the session the popup should appear, and how large it should be. If no specifications are given, the popup will open centered at its default size.

  • Top, Left, Bottom, and Right control how far the popup should be offset from each margin of the session.
  • Width and Height specify how large the popup should appear.


Position Relative

Relative Positioning enables the popup to be positioned based off of the mouse cursor position when used with a Mouse Event. The Circle icon in the center represents the mouse location. The arrows icons represent the location the popup will appear in relation to the user's mouse cursor. Click on an arrow to position the popup window.


Refresh Action

Reloads the current browser tab.



IULocgo


Refresh Action

Script Action

Write a script that happens on the event specified. See Perspective Component Methods and system.perspective Functions for more details on how to configure script actions.

This feature is new in Ignition version 8.0.5
Click here to check out the other new features

Script actions contain a built-in "event" object, that further contains values pertaining to the underlying event. As of 8.0.5 these values and descriptions are displayed in the docstring.



IULocgo


Script Action

Theme Action

Changes the theme for the session.

Action PropertyDescription
Select ThemeTheme that will be used, for example dark or light.
EnabledSpecifies whether the action should be used or ignored.



Native App Actions

The actions in this section are designed to help in gathering data from a mobile device. Each action needs to be configured in two parts:

  1. The action is run on a mobile device, indicating that a type of data should begin to be gathered.
  2. As the data is gathered, or once it's finished being gathered, it is sent to the Gateway to be handled by the corresponding Session Event.

All of these actions are designed specifically for the Ignition Perspective App for Android and iOS devices. If these actions are run in a browser session, they will be ignored.

Accelerometer Action

Retrieves accelerometer data from the device's accelerometer (a common feature on smartphones).

ModeDescription
Continuous

Begins recording accelerometer data, which repeatedly updates the accelerometer object in the current session's Session Properties.

  • Sample Rate indicates how often the accelerometer object should be updated.
Batch

Records accelerometer data at a specified interval for a specified rate, then sends the accumulated data to the Gateway, to be handled by the Accelerometer Data Received Session Event.

  • Sample Rate indicates how often a reading should be made.
  • Duration specifies for how long data should be logged.
  • Context provides the opportunity to pass a custom object through to the Accelerometer Data Received Session Event. Note that a session object is already provided to that event script.
OffTurns off accelerometer data recording.


IULocgo


Accelerometer Data Received

Scan Barcode Action

Allows the user to scan a single barcode on their mobile device, which is then sent to the Gateway and handled by the Barcode Scanned Session Event.

Action PropertyDescription
Barcode TypeIndicates the format of the barcode to be scanned. Any can be used to catch all barcodes.
ContextProvides the opportunity to pass a custom object through to the Barcode Scanned Session Event. Note that a session object is already provided to that event script.

IULocgo


Barcode Scanned

Scan NDEF NFC Action

Allows the Perspective app to catch any scans by the phone using the NFC data exchange format (NDEF), which is then sent to the Gateway and handled by the NFC NDEF Scanned Session Event. This suppresses any default behavior of the phone in catching the scan.

ModeDescription
SingleListens for a single NDEF scan to send.
ContinuousListens indefinitely for NDEF scans, which are sent to the gateway as they are received.
OffTurns off listening for NDEF scans.

IULocgo


NFC Ndef Scanned





  • No labels