Action Params

An action param defines a named input that a caller passes into an action when it is triggered. Within the action, the value is available as a context param and can be referenced in conditions, filters, and functions.

Action params make actions reusable. Instead of building a separate action for every variation of the same logic, you define the action once and let the caller supply the values that differ. A common example is a navigation action in an app: the action accepts an action param with the data type View, and a single Navigate action node navigates to whatever view the caller specifies.

What an action param can accept

An action param's data type determines what the caller can pass in:

  • Primitive values — strings, numbers, booleans, and other basic value types available on the platform.

  • Enumerated types — values from an enumerated type defined in the solution. An enumerated-type param can have cardinality one (a single value) or many (a list of values).

  • Schemas — structured data, with the schema defined inline on the param. This allows a caller to pass complex, nested data into the action without first modelling it as an object class. See schemas.

  • References to object classes — a reference to a single record (cardinality one) or a set of records (cardinality many) from an object class. See object classes for more information on data types.

  • Views — a reference to a view in an app. This data type is only available in app actions.

Creating an action param

Action params are defined on their parent action, alongside action variables and action data sources. The authoring surface differs between flows and apps:

  • In a flow action, action data is configured on the Action data tab in the flow action editor.

  • In an app action, action data is configured under Action settings in the right-side panel.

When adding an action param, choose a name and a data type. If the data type is set to schema, the Edit schema dialog opens where the schema structure is defined inline. An action param can be marked as required, which means the caller must always provide a value. If it is not required, a default value can be specified.

Passing action params

When an action is triggered, the caller maps values into the action's params. How this happens depends on the trigger:

From the UI. When an action is triggered by an event handler, action param values are configured on the event handler. Each param is bound to a value from the calling context — a data source property, an app variable, or a function result.

From another action. When an action is called by Run Action or a flow is called by Run Flow, the target action's params are displayed on the action node. Each param is bound to a value from the calling context in the same way — the only difference is that Run Action calls an action in the same app or flow, while Run Flow calls a flow from an app or from another flow. Because action params support schemas, structured data can be passed directly into an action or flow without first persisting it.

Reusing action params across actions

An action param — including any inline schema it carries — can be copied and pasted into another action. This works across actions in the same flow, across different flows, and into app actions. Copy-paste is the primary mechanism for replicating a param definition, and it carries the full schema structure along with it.

Properties

Property
Description

Name

A descriptive name.

Data Type

The type of data accepted as input for this parameter. See object classes for more information.

Schema

Available if Data Type is Schema Define the schema structure that the param accepts.

Cardinality

Available for enumerated types and object-class references. Whether the param accepts a single value (One) or a list of values (Many).

Required

Require that a value for this parameter is always specified when the action is triggered.

Default Value

Not available if Required is enabled or if data type is a reference to an object class or enum. Specify a default value to use in the case that a value is not provided when the action is triggered.

Last updated

Was this helpful?