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.
HTML Comment |
---|
|
I want to mention somewhere that there are many different ways to create actionflows, i.e. from a button a screen or from an event handler on an area on a screen. Actionflows can be created from the main actionflows page but this is not the easiest way. Can an actionflow even be created this way? How do you add an input? |
Event Handlers & Action Settings
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.Event handlers can be configured to respond to events by running a Insert excerpt |
---|
_action | _action | nopanel | true |
or , such as running an Insert excerpt |
---|
| _actionflow |
---|
| _actionflow |
---|
nopanel | true |
---|
|
.The types of event handler are:
Set event handlers 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 Events/Actions on: |
Event |
---|
TypeSupported ComponentsSupported FieldsField |
---|
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 This event is not triggered by the user typing into a field. |
Area- | 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. |
The Note: This event is triggered whether or not the data in the field has been changed. | - |
Tip |
You do not have to configure OnClick events for button components, because button actions are always triggered when the user mouse-clicks on them.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. |
|
|
Tip |
---|
On Click events are automatically set on button components. |
Adding an Event Handler
- From the a screen, click on a component or field to open its properties.In
Insert excerpt |
---|
| _property_tabs |
---|
| _property_tabs |
---|
nopanel | true |
---|
|
- Click on the
Insert excerpt |
---|
| _property_tabs |
---|
| _property_tabs |
---|
name | action |
---|
nopanel | true |
---|
|
and in the Event Handler section, click click the Insert excerpt |
---|
| _AddaddIcon |
---|
| _AddaddIcon |
---|
nopanel | true |
---|
|
to icon to create a new event handler. - PhixFlow opens a new properties tab for the event handler.
- Select the Event Type, Action Method and specific table-action or actionflow you require; see the properties below.
Event Handler In the New Event Handler Insert excerpt |
---|
| _property_settings |
---|
| _property_settings |
---|
nopanel | true |
---|
|
, select an Event Type
Tip |
---|
Only events available for this type of component will show - see Event Types table above. |
- For Action Method, select Actionflow, then click the
Insert excerpt |
---|
| _add_icon |
---|
| _add_icon |
---|
nopanel | true |
---|
|
icon to create a new Actionflow or click the Insert excerpt |
---|
| _actionflow_icon |
---|
| _actionflow_icon |
---|
nopanel | true |
---|
|
icon to display a list of available Actionflows
Adding Action Settings
- From a screen, right-click on a grid and press
Insert excerpt |
---|
| _view_show_config |
---|
| _view_show_config |
---|
nopanel | true |
---|
|
On the View's
Insert excerpt |
---|
| _property_settings |
---|
| _property_settings |
---|
nopanel | true |
---|
|
Basic Settings
Field | Description |
---|
Event Type | Select the type of event that will trigger an action: - OnClick
- OnEnter
- OnBlur
- OnChange.
The list shows only the events available for this type of component. |
Action Method | Available when Event Type is selected. Select the type of action: - Table-Action
- No action
- Actionflow
- Other
|
Action | Available when Action Method is Table-Action.
Either, select a table-action from the drop-down listOr, to find table-actions belonging to a specific table:Click Insert excerpt |
---|
_table_list | _table_list | nopanel | true |
to show tables in the repositoryExpand the table.Drag a table-action from the list into this box.Actionflow | Available when Action Method is Actionflow.
To select an actionflow, do one of the following:
Select an actionflow from the drop-down list.Click Insert excerpt |
---|
_actionflow | _actionflow | nopanel | true |
to show actionflows in the repositoryClick Insert excerpt |
---|
_add | _add- , click on the
Insert excerpt |
---|
| _property_tabs |
---|
| _property_tabs |
---|
name | action |
---|
nopanel | true |
---|
|
- In the Action Settings section, under Double Click Action, select Actionflow
- Click the
Insert excerpt |
---|
| _add_icon |
---|
| _add_icon |
---|
nopanel | true |
---|
|
icon to create a new Actionflow or click the Insert excerpt |
---|
| _actionflow_icon |
---|
| _actionflow_icon |
---|
nopanel | true |
---|
|
icon to display a list of available Actionflows
Worked Examples
Here are worked examples using the Retail Data (available from the Learning Centre).
In this example, we are using:
- A Shop Stock screen containing a grid of the Shop Stock data, a pie chart of the Shop Stock data and a grid of the Shop Departments data - this screen was created using the Multi-Tile template
- A Shop Statistics screen containing 4 tiles with charts and graphs of the Shop Stock data - this screen was created using the Tile no Buttons template
- A Shop Customer Form screen containing form fields and associated with Shop Customers data by a background filter - this screen was created using the Edit Form template
Tip |
---|
If you are completing this chapter as part of the Actionflow course and using a training instance, the data and screens have already been pre-loaded into the Actionflow Intermediate Application. For this example, we'll be working on configuring events on: - the Shop Stock screen to open the Shop Statistics screen
- the Shop Customer Form to display a specified text string
|
Example 1: Configuring an On Click Event
In this example, we'll set up an Actionflow to open a screen when an area is clicked.
Image Added
On the screen where the Actionflow will be initiated from, Shop Stock, find the area, Split Area Top (use the search in the
Insert excerpt |
---|
| _layers |
---|
| _layers |
---|
nopanel | true |
---|
|
)Click on the area to open its properties
- On the
Insert excerpt |
---|
| _property_tabs |
---|
| _property_tabs |
---|
name | action |
---|
nopanel | true |
---|
|
, in the Event Handler section, click the Insert excerpt |
---|
| _addIcon |
---|
| _addIcon |
---|
nopanel | true |
---|
|
to create a new event handler:- Event Type: select On Click
- Action Method: choose Actionflow
- Click
- Click the
Insert excerpt |
---|
| _addIcon |
---|
| _addIcon |
---|
nopanel | true |
---|
|
icon to create a new Actionflow- Name:
Open Shop Stock Statistics
- Click on the Split Area Top area properties
- On the Actionflow, select Click to Connect and choose an input of On Click
- Create an Open Screen Actionflow that opens the Shop Stock Statistics screen
See 1.07 Open Screen Action Configuration
Expand |
---|
|
Image Added |
- Close the Actionflow and
Insert excerpt |
---|
| _finish |
---|
| _finish |
---|
nopanel | true |
---|
|
the new event handler properties
- On the Split Area Top area properties, click the
Insert excerpt |
---|
| _property_tabs |
---|
| _property_tabs |
---|
name | style |
---|
nopanel | true |
---|
|
- In the Style Settings section, tick Cursor and set this to Pointer (hand pointing)
- This indicates to your application users that this area is clickable
Insert excerpt |
---|
| _finish |
---|
| _finish |
---|
nopanel | true |
---|
|
the area properties- the screen and click the area to see the Actionflow in action
HTML Comment |
---|
|
Example 2: Configuring a Double-Click EventConfigure a double-click action on a grid to open a screen where the selected record can be edited. On the screen where the Actionflow will be initiated from, Shop Customers, right-click on the grid and choose Insert excerpt |
---|
| _view_show_config |
---|
| _view_show_config |
---|
nopanel | true |
---|
|
On the View's Insert excerpt |
---|
| _property_settings |
---|
| _property_settings |
---|
nopanel | true |
---|
| , click on the Insert excerpt |
---|
| _property_tabs |
---|
| _property_tabs |
---|
name | action |
---|
nopanel | true |
---|
|
- In the Action Settings section, under Double Click Action, select Actionflow
- Click the
Insert excerpt |
---|
| _addIcon |
---|
| _addIcon |
---|
nopanel | true |
---|
| icon to create a new Actionflow- On the Actionflow, select Click to Connect and choose the Shop Customers data source
- This is because we want the Shop Customers Form to open with the selected customer's details on
- Create an Open Screen Actionflow that opens the Shop Customer Form
- See 1.07 Open Screen Action Configuration
Expand |
---|
| Remember to map across the customerID. |
- Close the Actionflow and
Insert excerpt |
---|
| _finish |
---|
| _finish |
---|
nopanel | true |
---|
| the view properties - the screen and double-click a record in the grid to see the Actionflow in action
|
Example 2: Configuring an On Change Event
In this example, we'll set up an Actionflow to display a dynamic text string when a boolean field's state is changed (from false to true).
Image Added
On the screen where the Actionflow will be initiated from, Shop Customer Form, find the True/False Field, mailingList (use the
Insert excerpt |
---|
| _layers |
---|
| _layers |
---|
nopanel | true |
---|
|
)Click the field to open its properties
- On the
Insert excerpt |
---|
| _property_tabs |
---|
| _property_tabs |
---|
name | action |
---|
nopanel | true |
---|
|
, in the Event Handler section, click the Insert excerpt |
---|
| _addIcon |
---|
| _addIcon |
---|
nopanel | true |
---|
|
to create a new
actionflow; see Creating Actionflows. Other | Available when Action Method is Other.
Select from the drop down:
NoneClear All Fields: clears content from all form fields on the parent formClose Screen: closes the parent screenMaximise/Minimise Screen: toggles the screen between minimised and its default sizeScreenshot: 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 Insert excerpt |
---|
_layers | _layers | nopanel | true |
or Insert excerpt |
---|
_repository | _repository | nopanel | true |
.- event handler:
- Event Type: select On Change
- Action Method: choose Actionflow
- Click
- Click the
Insert excerpt |
---|
| _addIcon |
---|
| _addIcon |
---|
nopanel | true |
---|
|
icon to create a new Actionflow
- On the Actionflow, select Click to Connect and choose an input of On Change
Using a
Insert excerpt |
---|
| _action_calculate |
---|
| _action_calculate |
---|
nopanel | true |
---|
|
Action, create an Output Attribute containing the following string: Code Block |
---|
|
"Inform the customer that they will receive weekly emails with news and offers." |
See 1.11 Calculate Action Configuration
- Create an Output Connection Point back to the Shop Customer Form screen
- Drag the node onto the Calculate action
- Drag the
Insert excerpt |
---|
| _output |
---|
| _output |
---|
nopanel | true |
---|
|
node onto the Calculate action - Map your new Output Attribute onto the dynamic text component, checkEmailText
Remember to map this both on the output connector on the canvas, and on the output connection point under Connections
Expand |
---|
|
Image Added |
- Close the Actionflow and
Insert excerpt |
---|
| _finish |
---|
| _finish |
---|
nopanel | true |
---|
|
the new event handler properties Insert excerpt |
---|
| _finish |
---|
| _finish |
---|
nopanel | true |
---|
|
the True/False Field properties- To test the Actionflow, close and reopen the screen, ensuring it is ed
- Populate the First Name and Last Name fields as these are mandatory fields and will show an error message if not populated
- Click the 'Would the customer like to join the mailing list?' toggle to see the Actionflow in action
Image Modified