Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|
Overview
When creating an application, you can configure Actionflows to respond to different events, such as a mouse click, double click or enter key press.
Event Types and Event Handlers
An Event Handler is an action that responds to a specific event, such as a mouse click, double click or enter key press. The Event Handler defines how the application behaves when the event is triggered, such as running a
or Insert excerpt _action _action nopanel true
. Insert excerpt _actionflow _actionflow nopanel true
Multiple event handlers can be set on the same component or field. For example, you may wish for a validation Actionflow to be triggered On Enter and On Blur.
Set Event Handlers on: | |||
Event Type | Description | Component | Data Field |
---|---|---|---|
On Click | The user mouse clicks in an area. | Area | - |
On Change | A toggle field changes state or the user mouse-clicks out of a data field in which they have changed data. Note: This event is not triggered by the user typing into a field. | - | Boolean Date Datetime Number String |
On Enter | The user presses the Enter key in a data field. | - | |
On Blur | The user mouse-clicks out of a data field. Note: This event is triggered whether or not the data in the field has been changed. | - |
Tip |
---|
On Click events are automatically set on button components. |
Event Types and Action Settings
Set Action Settings on: | |||
Event Type | Description | Component | Data Field |
---|---|---|---|
Double Click | The user double clicks in a grid. | View | |
Auto Save | The user changes data in a grid, then clicks out of the cell. | View | |
Drag Types & Drop Targets | User drags an item from one part of a screen, and dropping on another part. | View Kanban Area | |
Task Plan | The user starts a task plan or a task plan auto-starts according to its schedule. | ||
On Startup | The user loads the application. |
Adding an Event Handler
- From a screen, click on a component or field to open its
Insert excerpt _property_tabs _property_tabs nopanel true - Click on the
and in the Event Handler section, click theInsert excerpt _property_tabs _property_tabs name action nopanel true
icon to create a new event handlerInsert excerpt _addIcon _addIcon nopanel true In the New Event Handler
, select an Event TypeInsert excerpt _property_settings _property_settings nopanel true Tip Only events available for this type of component will show - see Event Types table above.
- Select an Action Method:
- Actionflow: Click the
icon to create a new Actionflow or click theInsert excerpt _add_icon _add_icon nopanel true
icon to display a list of available ActionflowsInsert excerpt _actionflow_icon _actionflow_icon nopanel true Table Action: Choose a table action from the dropdown or select the
icon to find table-actions belonging to a specific table:Insert excerpt _tables _tables nopanel true Click the chevron to expand the table in the RepositoryDrag a table-action from the list into the Table Action box.ZB remove completely?
- Other: Choose an option from the drop down:
- None
- Clear All Fields: clears content from all form fields on the parent form
- Close Screen: closes the parent screen
- Maximise/Minimise Screen: toggles the screen between minimised and its default size
- Screenshot: copies an image of the selected component to the clipboard
- The required component must be dragged and dropped into the Screenshot Component box from the
orInsert excerpt _layers _layers nopanel true Insert excerpt _repository _repository nopanel true
- The required component must be dragged and dropped into the Screenshot Component box from the
- Actionflow: Click the
Adding Action Settings
- From a screen, right-click on a grid and press
Insert excerpt _view_show_config _view_show_config nopanel true
Worked Examples
Here's a worked example using the School Data (available from the Learning Centre).
In this example, we are using:
A Course Management screen containing a grid of the School Courses data - this screen was created using the Tile with Buttons templateA Course Form screen containing form fields and associated with School Courses data by a background filter - this screen was created using the Edit Form template
Tip |
---|
|
We want to be able to add and edit courses on a Course Management screen. The first step to doing this is by creating two Open Screen Actionflows. Both will open the same screen containing form fields, but when we are adding a new course we want empty form fields, and when we are editing an existing course, we want the form fields to contain course data.
GIF/SCREENSHOT OF FINISHED RESULT
Example 1: Configuring an On Click Event
Configure an area to open a screen on clicking.
On the screen where the Actionflow will be initiated from, Orders Management, click on the area, ClickableArea (use the
) to open its propertiesInsert excerpt _layers _layers nopanel true - On the
, in the Event Handler section, click theInsert excerpt _property_tabs _property_tabs name action nopanel true
to create a new event handler:Insert excerpt _addIcon _addIcon nopanel true - Event Type: On Click
- Action Method: Actionflow
- Click
Insert excerpt _save _save nopanel true - Click the
icon to create a new ActionflowInsert excerpt _addIcon _addIcon nopanel true - Create an Open Screen
- Actionflow that opens
- On thescreen where the Act
- the Staff Management screen
the new event handler propertiesInsert excerpt _finish _finish nopanel true
the area propertiesInsert excerpt _finish _finish nopanel true
the screen and click the area to see the Actionflow in actionInsert excerpt _lock _lock nopanel true
Example 2: Configuring an On Blur Event
Create an Open Screen Action that opens an empty input form.
On thescreen where the Act
Example 3: Configuring an Double Click Event
Create an Open Screen Action that opens an empty input form.
On thescreen where the Act