Show Alert
Shows an alert or a dialog with buttons. Each button can run its own steps.
Category: Messages & Feedback
#When to use it
Use it to ask before something that can't be undone, to let the person choose between a few options, or to ask for one short answer.
#Example
A note's Delete button, When Tapped:
- Title:
Delete this note? - Buttons: tap Add button, title it
Deleteand set its role to Destructive. Inside it, add Remove from List and Go Back / Close. - Tap Add button again for a
Cancelbutton with role Cancel and no steps.
#Good to know
- The run waits for an answer. Then the tapped button's steps run, then the steps after Show Alert.
- With Input, the alert has a text field. What's typed is saved into that variable when the alert closes, before the button's steps run.
- Style: Dialog shows the buttons as a list of choices instead of a centered alert.
- With no buttons, the alert has one OK button.
#Add it
Select a view, open the Inspector's Actions tab, pick when it runs, tap Add action and choose Show Alert (under Messages & Feedback). Tap the step to open its settings.
#Settings
| Setting | What it does | Kind | Default |
|---|---|---|---|
| Title | The bold first line. | Text | Required |
| Message | More detail under the title. | Text | |
| Buttons | The buttons. A destructive one shows in red; a cancel one closes without doing anything. | Buttons | [{'title': 'OK'}] |
| Style | A centered alert, or a dialog of choices. | Choice: Alert, Dialog | alert |
| Input | Adds a text field; what's typed goes into this value. | Variable | Optional |
| Placeholder | Gray hint text in the field. | Text |