Versions Compared

Key

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

This page explains how to set the properties for stream item action rules.

Stream item action rules connect data records (items) in a stream with an action.

This property tab is not available from the repository. It opens from an action properties → Stream Item Action Rules section.

Also see stream item action - where the knuts and bolts of what the stream item action is set

Basic settings

stream item action type

Stop if true

Expression

Order

...

Basic Settings

...

  • Selected Items - Action will only apply to the records selected on the view from which the action was initiated unless the Target View is specified.
  • Edited Items - Action will only apply to the updated records on the view from which the action was initiated unless the Target View is specified.
  • View Filter - Action will only apply to the records shown on the view from which the action was initiated unless the Target View is specified.
  • Action Filter - Action will only apply to the records retrieved by the filter defined in the action.
  • Dragged Items - Action will only apply to the records which are being dragged in the case that this is a drag and drop action.
  • Drop Target Items - Action will only apply to the records which are having records dropped onto them in the case that this is a drag and drop action.

...

This is only available if you have selected Filter Type = Action Filter.

Create a filter to specify the records that an Update or Delete will apply to. Any expressions on this filter can reference the Form View fields, Context Parameters and any attributes from any record selected on the view or dashboard from which this action was initiated. Configure this filter in the same way that you would a pipe filter.

Action Attributes

The list of attributes that will be populated by the action - whether an update or insert.

This section includes the button Image Removed - this brings up the list of attributes for the stream that you are building the action on. Drag any attributes you want from this list into the action, or add them by pressing Image Removed.

For each attribute, configure the following fields:

...

The expression used to generate the new attribute value. This is written as a PhixFlow Expression.

  • Dashboard Element Name You can reference selected records from other dashboard views by using their dashboard element names within the expression. E.g.
Code Block
sum(ACCTS.amount)

will sum up all values in amount from the records select in the view with dashboard element name ACCTS.

  • No Prefix  If you want to refer to the current values of the record you are about to update, then simply refer to the attribute name with no prefix.
  • _prompt  You can reference fields from any user input form associated with this action by referencing the form field name prefixed by _prompt.
  • _form   You can reference the current value displayed in a field on the form by using _form as a prefix.
    For example: In the screenshot below, the expressions use _form to reference fields that are displayed on the form (Unit Price, Quantity and VAT Percentage). 

Image Removed

The usual message functions debug(message), info(message), warning(message), and error(message) are all available to be used in these expressions and will result in messages being written to the system console logs.

Be careful when using the error(message) function - this will stop the action from being completed for the current stream item. However, it will not stop the action from updating/ inserting other stream items.

  • _out   You can also use the prefix _out to reference the current value of an attribute in the action. Note that in the above example, to use the value for the attribute ChargeAmount in VATAmount the expression uses _out.ChargeAmount.
  • _context Reference any context variable defined on this Action or passed through to this Action.
  • _gridRow When the Filter Type is Edited Items this object contains a recordset pointing to an individual row that had been modified.

...

Insert excerpt
_Banners
_Banners
nameTableActions
nopaneltrue

This page is for application designers who need to configure when a specific operation will change data in the table.

Overview

Insert excerpt
_action_concepts
_action_concepts
nopaneltrue

Creating a Record-Action Rule

To use a record-action in an action and to add a rule for it:

  1. Open the table-action properties.
  2. In the toolbar of the Record-Action Rules section:
    • either click 
      Insert excerpt
      _new
      _new
      nopaneltrue
        to create a new record-action rule. 
    • or click 
      Insert excerpt
      _action_SIA
      _action_SIA
      nopaneltrue
       to open a repository list of tables.
      Expand the branch for the table, then drag its record-action into the action properties → Record-Action Rules grid.
      Double-click on row of the grid to open the record-action rule properties. 

Record-Action Rule Properties

Use the following properties to configure the conditions or rules under which the record-action will run. 

This properties pane is not available from the repository. It only opens from the Table-Action properties.

Insert excerpt
_property_toolbar
_property_toolbar
nopaneltrue

Insert excerpt
_property_tabs
_property_tabs
namebasic-h
nopaneltrue

Insert excerpt
_parent
_parent
nopaneltrue

Basic Settings

FieldDescription
Record-Action

Select or add a record-action.

To add or change the selected record-action, do one of the following:

  • select a record-action name from the drop-down list of all SIAs in the repository.
  • click 
    Insert excerpt
    _new
    _new
    nopaneltrue
     to create a new one; see Record-Action
  • click 
    Insert excerpt
    _action_SIA
    _action_SIA
    nopaneltrue
     to open the repository Tables branch to find a record-action and drag it in. This makes it 
    easier to find a record-action for a specific table.
Stop if True

Enter an expression. If the expression evaluates to true, PhixFlow runs this action. However, it does not:

  • evaluate any more record-action rule expressions
  • run any more of the record-action.
Expression

Enter an expression. If the expression is empty or evaluates to true, PhixFlow runs this action. To prevent an action from running in specific conditions, enter an expression that evaluates to false.

Insert excerpt
_true_false
_true_false
nopaneltrue

Order

Specify the order in which this record-action is listed in the action properties → Record-Action Rules grid. PhixFlow evaluates the record-action in order and runs those that evaluate to true in order.

Insert excerpt
_audit
_audit
nopaneltrue

Live Search
spaceKey@self
additionalnone
placeholderSearch all help pages
typepage

Panel
borderColor#00374F
titleColorwhite
titleBGColor#00374F
borderStylesolid
titleSections on this page

Table of Contents
maxLevel3
indent12px
stylenone


Learn More