Show Popup – showing a message or asking the user¶
The command "Show Popup" shows a message to the user and waits. With buttons, it asks a question and writes the answer into a variable. This page is for administrators who build interactive actions.
1. At a glance¶
| Purpose | Inform the user, or let them decide something in the middle of an action |
| Typical use | "Invoice created", "Really cancel the order?", choosing between two ways to continue |
| Where in the editor | Toolbar menu "UI" → "Show Popup" |
| Needs a user interface | Yes |
| Needs a current record | No (the expressions may read one) |
| Related | Switch, Update Variable, Dispatch UI |
2. Settings¶
Like every command, the command has "Display Name", "Description" and "Execution Condition" on the tab "General" (see Actions).
Tab "Settings":
| Setting | Meaning | Default / Required |
|---|---|---|
| "Title" | Expression for the title | Set at least title or content |
| "Content" | Expression for the message | Set at least title or content |
Tab "Buttons":
| Setting | Meaning | Default / Required |
|---|---|---|
| "Button Response Variable" | The variable that receives the result of the pressed button | Empty |
| Buttons (add with the add button, order with the arrows) | The buttons of the popup, see below | None: a message with "OK" |
Each button has:
| Part | Meaning | Default |
|---|---|---|
| "Button Text" | Expression for the label | Empty label |
| "Result Expression" | Expression for the value written into the response variable when the button is pressed | Empty value |
| "Visible" | Logical expression; the button is only shown if it is true | Always shown |
| "Cancel Action" | Pressing the button ends the action instead of continuing | Off |
All expressions are evaluated against the current record when the popup is shown, and can use the variables of the action.
3. Behaviour¶
- Without a user interface, the command is skipped. An action that relies on the answer cannot run from a schedule, a background rule, a mailbox listener or the REST API.
- Title and content are computed.
- Without buttons, a message with "OK" is shown. The action continues when the user closes it – within the UI interaction timeout of the action (section 5); otherwise the action ends with an error.
- With buttons, the visible buttons are shown and the action waits for the user – as long as it takes.
- A button with "Cancel Action", or closing the popup without pressing a button, ends the action (without an error). The response variable is not written.
- Any other button writes its result into "Button Response Variable", and the action continues.
Before a popup without buttons appears, open forms are drawn with the current values, so the user sees what the action has changed so far.
4. Examples¶
Confirmation. Before cancelling an order:
| Setting | Value |
|---|---|
| "Title" | "Cancel order" |
| "Content" | "Do you really want to cancel this order? The customer will be informed." |
| Button 1 | "Button Text" "Yes, cancel", "Result Expression" yes |
| Button 2 | "Button Text" "No", "Cancel Action" on |
"No" ends the action; "Yes, cancel" continues with the next command. No response variable is needed.
Choice. Buttons "Email" (result mail), "Letter" (result letter) and "Cancel" ("Cancel
Action"), response variable "Channel". A Switch with the cases "Channel = mail" and
"Channel = letter" continues accordingly. The button "Letter" has "Visible" "Customer has postal
address".
5. Limitations¶
- A popup without buttons counts as an interaction the application answers itself: if the user leaves it open longer than the UI interaction timeout of the action (default 120 seconds, see Actions), the command fails and the action ends with an error. Popups with buttons wait without a limit. If users may take long to read a message, give it a button.
- Give every non-cancel button its own result value – buttons without one write an empty value, and the action cannot tell them apart.