Table-Actions (Legacy)
This page is for application designers who want to know how to configure table-actions.
Overview
Actions make PhixFlow applications interactive, converting a static screen into a user interface. Simple individual actions can be combined to provide complex functionality. This enables the application user to interact with the screens, screen components and data.
Actions can be configured using either Actionflows or Table-actions.
Actionflows
Use Actionflows in applications created in version 9.0 and later.
See Actionflows.
Table-actions
Use a Table-action in applications created in versions 8.3 and earlier.
Table-actions:
belong to a table
use table and attribute names
- are made up of a list of record-actions that run in sequence to update data and interact with screens.
can have rules or context parameters to determine when a record-action runs.
To learn how to configure user interactions with table actions, see Using Table-Actions and Table-Action properties.
Understanding Table-Actions
Functionality can be:
- changes to the records in a table. For this use Record-Action and Record-Action Rule.
- changes to data in a table using table-actions, which are used in older applications built before record-actions existed. You can also use a table-action to run multiple record-actions.
- unrelated to data, for example to configure a button-click to open a different screen. For this use an unbound table-action, which is not linked to a table.
You can also use an unbound table-action to make changes to multiple different tables.
You can create table-actions on:
- components, such as buttons
- grid cells that contain:
- strings
- numbers
- dates or date-times
- boolean true/false.
You can drag a table-actions:
- onto a view to create a set of buttons that appear in the view header
- into the menus belonging to an application.
To make changes to the data in a table use a record-action. Each record-action is a single operation that can happen to a record in the table. Record-actions can create, read, update or delete a record, so are sometimes called CRUD actions. To configure PhixFlow to perform several operations to the data record-actions directly to a table. Alternatively, to configure PhixFlow to perform several operations An action/table-action can potentially run any of the record-actions in its list. To decide which record-action to run, create a rule associated with each record-action. When the rule evaluates to true, the record-action runs, making a change to the data in the table. See Record-Action and Record-Action Rule properties.Record-Action Concepts
Configuring Table-Actions
We recommend you use a Record-Action and Record-Action Rule to add functionality to a screen. Table-actions are available for backwards compatibility with applications designed with earlier versions of PhixFlow.
To configure an unbound table-action, which is not associated with any table:
- Expand the repository branch for your application.
- Right-click on Table-Actions and select Create New.
Configure the table-action to:
- open or close a screen
- show prompts or messages to communicate with the user.
Unbound table-actions can be exported to other instances of PhixFlow.
To configure a table-action:
- Expand the repository for your application.
- Expand the table on which the table-action will operate.
- Right-click on Table Actions and select Create New to open the properties for your new table-action.
You can configure a table-action to:
- run record-actions, which create, update or delete data
- run a task plan
- run analysis on a model
- upload files
- consider the contexts in which the action will or will not run, using context parameters
- validate data or attributes before running the table-action
- open or close application screens after the action completes
- show prompts or messages to communicate with the user, for example to confirm they want to run the table-action, or to notify them of any errors.
Order of Table-Action Steps
When you configure record- and table-actions, you need to know the order of processing. All steps are optional and are only carried out if you have configured the action for the step.
Step 1 Open a form view
Open the form view where the application user can enter or select data. The data provides parameters for this action.
Step 2 Open a file explorer window
Open a file explorer window where the application user can navigate to a directory and select one or more files.
Step 3 Evaluate context parameters
Evaluate context parameters in the order specified in their properties. Context parameters are values entered or selected on a view or screen from which the action was initiated.
You can configure a context parameter expression to reference:
- values using the syntax:
_prompt.field-name
wherefield-name
is the name of the data field component containing the value. - attributes using the syntax:
view-name.attribute-name
Whereview-name
is the name or alias for the data view containing the attributeattribute-name
is the name or alias of the attribute.
- $-variables from other context parameter expressions on the same action.
Step 5 Upload the selected files
If the action is uploading file, remember to mark them with the evaluated tag value so that they can be retrieved later by a suitably configured File Collector.
Step 6 Evaluate the validation expression
Check that any incoming data provided by the application user are valid.
Configured validation in the table-action properties → Action Validation expression. A validation expression expression references:
- values entered on the form using the syntax:
_prompt.field-name
wherefield-name
is the name of the data field component containing the value. - the values of any context parameters using the syntax:
_context.param-name
whereparam-name
is the name of the context parameter. - any attributes of selected records from the screen or view where the action was initiated
using the syntax:view-name.attribute-name
whereview-name
is the name or alias for the data view containing the attributeattribute-name
is the name or alias of the attribute.
- attributes being dragged/dropped using the syntax:
_dragSource.attribute-name
_dropTarget.attribute-name
whereattribute-name
is the name or alias of the attribute.
If the validation expression generates any error messages (including by using the error function) then PhixFlow stops processing the table-action.
Step 7 Retrieve a set of records from the database
Retrieve a set of records selected on the view from which the action was initiated.
Where you have configured:
- Update or Delete Action on the Item Updates tab
- and Filter Type = View Filter or Action Filter
the filter is applied. Filter expressions can refer to the fields, context parameters or attributes.
Step 8 Perform record updates
Carry out any record updates configured in the Update Records section.
Update and delete actions are be applied to the records retrieved from the database in step 7.
When carrying out Insert or Update actions, each table-action attribute expression will be evaluated in turn to calculate the new value for that attribute. These expressions can refer to the form view values, the context parameters, the values of any attributes of items selected on the view or screen from with the action was initiated. Or, for Updates, the values of attributes from the records retrieved from the database.
To refer to values of attributes retrieved from the database simply refer to the attribute name without any prefix. Please note, even where a record retrieved from the database is based on a record selected on a view, the values on the record retrieved from the database may differ from those on the view as the record in the database may have been updated by another user since the view was last refreshed. If any attribute expression fails, or an error message is sent using the error function, then that record will not be updated, deleted or inserted. However, if multiple records are being updated, a failure of one record will not prevent the others from being updated or deleted.
With drag and drop actions, either the items being dropped or the items having other items dropped onto them can be chosen to be updated. In the table-action attribute expressions, you can refer to both _dragSource and _dropTarget.
Step 9 Run task plan
If a task plan has been specified, run this now. Any context parameters can be referenced by any expression run during that task plan.
Step 10 Close starting screen
If Close Parent Screen has been set, close the screen from which the action was initiated.
Step 11 Open post-action screen
If a post-action screen has been specified, open this now. Any filter of any view on that screen can reference any context parameters set on this action. If the specified screen is already open it will be brought to the front and refreshed rather than a second instance of the screen opening.
Learn More
Terminology changes in progress As part of the redesign of PhixFlow, we are changing the following terms: dashboard → screen
stream → table
stream attributes → attributes
stream item → record
stream set → recordset
stream view → view
stream item action → record-action
stream action → table-action
driver class → database driver