Versions Compared

Key

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

This page explains how to set context parameter properties parameters for an action.

An action can take into account values or attributes to decide whether or not to run. It is not possible to refer to one context parameter from another.

This setting properties tab is not available from the repository. It opens from an action properties → Context Parameters section.

Insert excerpt
_standard_settings
_standard_settings
nopaneltrue

Basic Settings

FieldDescription
Order
The
Enter the order in which context parameters will be evaluated.
Name
The
Enter the name of the context parameter.
Either select an attribute name from the drop-down list, or enter a different name.
Expression
An

Enter the expression for the context parameter.

The

 

Unlike stream action attribute expressions, context parameter expressions can

refer to any values entered on the form view using the notation:
Code Block
_prompt.<Form Field Name>
The context parameters can also refer to any attributes of any records selected on the view or dashboard

evaluate to a list of values as well as single values.

The context parameter expressions can refer to:

  • data from the dashboard, view or form from which the action was initiated
using the notation:Context parameters may also refer to
Code Block
<View name or alias>.<Attribute name or alias>
The usual
  • $-variables used in other context parameter expressions on the same action.

It is not possible to refer to one context parameter from another.

The values returned by the context parameter expressions can be referenced by the Validation expression, the Filter, the Maximum and Minimum Items expressions, any Stream Action Attribute expressions and any dashboard opened by this action.

The context values are referenced using the syntax:

Code Block
_context.<context parameter name>

Unlike stream action attribute expressions, context parameter expressions can evaluate to a list of values as well as single values.

Use the notation:

  • _prompt.<Form Field Name>   to refer to values on a form
  • <View name or alias>.<Attribute name or alias>   to refer to attributes of selected records

The expression can include the 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

, which write messages  to the system console logs.

Be careful when using the

Remember that error(message) function

as this will stop

stops the action from

being completed

completing.


Panel
borderColor#7da054
titleColorwhite
borderWidth4
titleBGColor#7da054
borderStylesolid
titleExample

A view called Customers shows a list of customers including the account ID, name and other account details. You want to create an action button to open up another dashboard, containing a view called Invoices, which will show the invoices for the customer selected on the Customers view.To do this:

  1. Add an action button to the Customers view, and configure it to open the dashboard containing the Invoices view
  2. Add a context parameter called Account to the action, with the context parameter expression set to customers.account_id
  3. On the background filter of the Invoices view, set the filter to only select those invoices whose account_id is equal to _context.account.

Referring to a Context Parameter

The values returned by the context parameter expressions can be referenced by:

  • the validation expression
  • the filter
  • the maximum and minimum items expressions
  • any stream action attribute expressions
  • any dashboard opened by this action.

The context values are referenced using the syntax:

Code Block
_context.<context parameter name>