Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Insert excerpt
_Banners
_Banners
nameTableActions
nopaneltrue

This topic page is for application designers who want to know how to configure table-actions.

Todo-Anthony: decide if you want to expand this page. It would be helpful to clarify:

  • stream-actions
  • parentless stream-actions
  • stream-item-actions

To configure an operation using an action:

  • Add an action directly to the repository. Actions that are not associated with a stream can do things like open dashboards. 
  • For specific stream, you can create an action to operate on the stream data. Action on a stream can: create,

    Understanding Table-Actions

    Use table-actions to add functionality to an application created in PhixFlow version 8.3 or earlier. For applications created in version 9.0 or later, use actionflows; see Creating Actionflows.

    Functionality can be:

    • changes to the records in a table. For this use Record-Actions and Record-Action Rules.
    • 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.

    Insert excerpt
    _action_concepts
    _action_concepts
    nopaneltrue

    Configuring Table-Actions

    We recommend you use Record-Actions and Record-Action Rules 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:

    1. Expand the repository branch for your application.
    2. Right-click on Table-Actions and select 
      Insert excerpt
      _new
      _new
      nopaneltrue
      .

    Configure the table-action to:

    • open or close a screen/dashboard
    • 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:

    1. Expand the repository for your application.
    2. Expand the table on which the table-action will operate.
    3. Right-click on Table Actions and select 
      Insert excerpt
      _new
      _new
      nopaneltrue
       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
    a screen/dashboard
    • application screens after the action completes
    • show prompts or messages to communicate with the user

    Actions can:

    • make changes to data in a stream. In this case the action is connected to the stream data via one or more action rules.
    • make changes unrelated to data, for example to open or close a dashboard.
    • run a task plan.
    • You can optionally configure

      • the contexts in which the action will or will not run using context parameters
      • a prompt to confirm the user wants to run the action
      • something about uploading a file
      • that PhixFlow checks the conditions to allow the action to run are met (validation)
      • a task plan that will run after the actions
      • any dashboards to open or close when the action completes
      • a message to display after the action completes, for example with errors and warnings

    See also:

    The pages in this topic are:

    Child pages (Children Display)depth4
    • , 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
      where field-name is the name of the data field component containing the value.
    • attributes using the syntax: view-name.attribute-name
      Where
      • view-name is the name or alias for the data view containing the attribute
      • attribute-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
      where field-name is the name of the data field component containing the value.

    • the values of any context parameters using the syntax: _context.param-name
      where param-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
      where
      • view-name is the name or alias for the data view containing the attribute
      • attribute-name is the name or alias of the attribute.

    • attributes being dragged/dropped using the syntax: 
      _dragSource.attribute-name
      _dropTarget.attribute-name
      where attribute-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.