Events and Actions

Increase the functionality of your apps with Events and Actions. In SOTI Snap, you can configure app events, like clicking a button or leaving a text box, to trigger certain actions. For example, if your app has multiple pages, you can add a button that, when clicked, opens a specific page in your app.

Example usage of buttons to navigate from one page to another.

SOTI Snap supports several event types, each with multiple actions you can use.

Note: Not all widgets support events and actions. In the Canvas, you can see which widgets allow Events by checking the widget configuration panel on the right. The Events tab is completely disabled for widgets that do not support events. Furthermore, even if a widget does support events, it likely does not support all events. Some widgets, like Table and Video Player, support multiple events.

Difference in widget configuration panel for widgets that support events and widgets that don't

Events

Event Description
On Blur Is triggered when the app user leaves a previously active input field, such as a text box.
On Change Is triggered when the app user changes the selected option to another option, such as in a dropdown list or between radio buttons.
On Check Is triggered when the app user selects or clears an option in a checkbox.
On Click Is triggered when a button is selected.
On Load Is triggered when the app page that contains the widget is loaded.
On Read Is triggered when the app reads an NFC tag.
On Scan Is triggered when the app scans a barcode.
On Select / Deselect Is triggered when the app user selects one or more options from a widget.
On Video Play Is triggered when the app user plays a video (or the video starts through autoplay) in a Video Player widget.
On Video End Is triggered when a video ends in a Video Player widget or if an app user exits fullscreen mode. If the playlist has multiple videos, this event is triggered when each video ends.

Actions

Action Description
Call Calls the specified phone number.
Exit App Closes the app and returns to the app catalog.
Invoke Data Export Initiates data transfers as specified in the app's Data Export Connections settings.
Invoke Data Import Initiates data transfers as specified in the app's Data Import Connections settings.
Launch Map Open the device's default map app to the specified location. Enter a URL for Google Maps or Bing Maps in the Location URL field.
Launch SOTI Hub Opens the SOTI Hub app.
Launch SOTI Surf Opens the SOTI Surf app.
Map Columns Populates the field of a linked widget (such as a textbox) with content an app user selects from an external data widget. You can map different columns in the external source to other widgets.
Map Read Value Pulls data read from an NFC widget and inserts it into the specified fields within the app.
Map Scanned Value Pulls data scanned from a barcode widget and inserts it into the specified fields within the app.
Navigate Sends the app user to a specified page or location within the app.
Navigate Back Sends the app user back to their previous location within the app.
Open Calendar Launches the device's default calendar app.
On Blur Executes an action when the widget loses focus (i.e., another widget becomes active).
On Enter Sets focus to another widget after the device's Enter key is selected.
Open Web Browser Launches the device's default web browser and navigates to the specified URL.
Reset Clears page data.
Run Blockly Executes custom code developed using Blockly when the event is triggered. Blockly is a visual programming interface that uses colorful blocks to represent coding concepts in an easy-to-understand manner and requires no programming experience. It allows SOTI Snap administrators unfamiliar with JavaScript to develop custom actions.

See Run Blockly for an example.

Note: Learn more about Blockly from the Google Blockly Reference Guide.
Run JavaScript Executes custom JavaScript code when the event is triggered. Paste in your custom JavaScript code or click Script Editor to open a larger editing field where you can type in your code.
Send Email Sends an email to the specified email address.
Send SMS Sends an SMS to the specified phone number.
Set Focus to Widget Makes another widget active and ready to accept input without the user selecting it. This action reduces user effort and can guide the user to the next required input.

This action is not available for all widgets. You may also choose to Run Blockly and use the Set Focus block.

Show image in light-box Displays an image in full screen with a blurred background.
Submit Automatically submits data entered into a form.
Note: The Submit action is only available on pages nested under Form screens.
Sync Automatically synchronizes data between the device and the SOTI Snap server, depending on the app's data sync settings: 1-way sync only uploads data from the device to the server, while 2-way sync synchronizes data between the device and the server.
Note: The Sync action is only available on pages nested under Form screens.
Validate Page Checks that the content entered on the page conforms to any set validity standards.