Versions Compared

Key

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

This properties opens from the Stream Item Action.

Use these properties to configure an expression that affects This page is for application designers who want to configure actions.

When you are creating stream item actions for a stream, use the action attribute properties to add an expression  thataffects what an action does when applied to this specific stream's attribute.

This properties tab is not available from the repository. It opens from the Stream Item Action (SIA) page.

Insert excerpt
_standard_settings
_standard_settings
nopaneltrue

FieldDescription
Order
The
Enter the order in which the action attributes are evaluated. 
Attribute
The
Enter the name of the stream attribute that will be populated.
Expression
The expression used to

Enter an Expression to generate the new attribute value. 

To refer to stream attributes, pipes and elements in the expression, use:

  • <attribute-name> to refer to the current value
. This is written as a PhixFlow Expression.Dashboard Element Name You can reference
  • of the record you are about to update.
  • <pipe-name> to refer to lookup pipes on the same stream as the action. The pipe cannot reference _out variables directly. Not sure if this is related to the note about 7.6 or if its a general comment.
  • <dashboard-element-name> refers to 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
  • .
Panel
titleExample

For example:

  • A dashboard element name is ACCTS.
  • In the dashboard, the user will select records in a grid view.
  • For the selected records, you want the action to sum the values in the amount attribute.

Enter an expression:

Code Block
sum(ACCTS.amount)



You can also use the following prefixes:

  •  _prompt.<form-field-name> to refer to fields from any user input form associated with this action
by referencing the form field name prefixed by _prompt._form   You can reference


  • _form.<form-field-name> to refer to the current value displayed in a field on the

form by using _
  • form

as a prefix.
For example:
  • .

    Panel
    titleExample

    In the screenshot below, the expressions use _form to refer 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 user sees these fields on a form.

    Image Added



  • _out.<attribute-name> to refer to the current value of an attribute in the action.
 Note that

  • For example, in the screenshot above
example
  • , you could refer to
use
  • the value for the attribute ChargeAmount in VATAmount with the expression
uses
  • _out.ChargeAmount.

  • _
context Reference
  • context.<context-variable-name> refer to any context variable defined
on this Action or passed through to this Action
  • for this action.

  • _
gridRow When
  • gridRow.<??> when the Filter Type is Edited Items this object contains a recordset pointing to an individual row that had been modified.
"pipe" Expressions can refer to lookup pipes on the same stream as the action. Note that at version 7.6.0, lookup pipes used in this way can only be driven by $ variables i.e. if the lookup filter or cache lookup needs to be driven by values from the action, then those values nust be passed in by $ variables. The pipe cannot reference _out variables directly. 

Messages

You can use the message functions in the expression. When the action runs, any messages are written to the system console and logs.