Portal Community

Event → Action Pattern

Every interactive widget emits events. Each event can have one or more actions configured. The App Studio Action Executor runs those actions when the event fires at runtime.

1

Widget Emits Event

User clicks a Button, submits a Form, or selects a DataGrid row. The widget fires its event (e.g., onClick).

2

Action Executor Picks Up

The Action Executor looks up the configured action(s) for that widget's event. It resolves any token expressions in the action config using the current app state.

3

Action Executes

The action runs — navigating to a page, triggering a workflow, opening a modal, or setting a variable. If multiple actions are chained, they run in sequence.

Available Action Types

TypeWhat It DoesKey Config
navigateNavigate to an AppPage (internal) or external URLtarget, params, replace
submit-formSubmit a Form Widget, then handle success/errorformWidgetId, onSuccess, onError
trigger-workflowStart a Flow Studio workflow with input variablesprocessId, input, onComplete
open-modalShow a modal Pane as an overlaypaneId, closeOnBackdrop
set-variableSet an app variable to a value or expressionvariable, value
chainRun multiple actions in sequenceactions[] (ordered array)
conditionalRun action only when expression is truthycondition, then, else

Widget Events Reference

EventWidgets That Emit It
onClickButton, Image, Text (when clickable: true)
onSubmitForm widget (after successful validation)
onValidationErrorForm widget (failed validation)
onRowSelectDataGrid (row click, when selectable: true)
onRowDblClickDataGrid (row double-click)
onChangeTextInput, Dropdown, Toggle, DatePicker
onMountAny widget — fires when the widget loads on the current page
onEventClickCalendar widget
Row Context in Actions

When a DataGrid onRowSelect action fires, the selected row's data is available as {{ row.fieldName }} in the action config. For example, target: "/leads/{{ row.id }}" navigates to the detail page for the clicked row.