Ask for input before an action runs
Section titled “Ask for input before an action runs”This how-to is for builders whose buttons need a little information first: Put on hold needs a reason and a date, Escalate needs the person to escalate to, Extend deadline needs the new date. The button opens a dialog, the person fills it in, and the automation uses the values.
The example adds a Put on hold button to a Requests entity. It asks for a reason and a date, writes both to the request, and tells the requester.
You need:
- Developer access on the module, to add views, reactions and buttons.
- The basics of buttons and reactions. See Buttons and Run from a button: Custom Action.
How it fits together
Section titled “How it fits together”flowchart LR A["Button: Put on hold"] --> B["Dialog<br/>(fields from a view)"] B -->|"Send"| C["Custom Action reaction"] C --> D["Update Data Entry<br/>with the dialog's values"] C --> E["Send Notification"]
The dialog’s fields come from a view (or from fields you describe yourself). What the person enters is not saved anywhere by itself: the reaction’s actions decide what happens to it.
Step 1: Make the view that shapes the dialog
Section titled “Step 1: Make the view that shapes the dialog”- On Requests, add the fields the dialog should end up filling — here Hold reason (text) and Hold until (date).
- Add a view for the dialog, for example Hold dialog. See Data views.
- In the view’s settings, turn on Editing entries.
- Turn on Ask user for, and in Choose fields pick Hold reason and Hold until. The list marks the fields that are required on the entity; they are required in the dialog too. See Design the forms.
- Publish the view.
The view’s styles and help text also apply to the dialog. See Style a view with custom CSS.
Step 2: Add the custom action that asks
Section titled “Step 2: Add the custom action that asks”- On Requests, add a reaction Put on hold with the event Custom Action.
- Keep Custom action level at UI action — only UI actions can be attached to a button — and keep Contextual on, so it runs on the request.
- Turn on Ask User For.
- In Dialog Name, enter the dialog’s title, such as Put on hold.
- In Fields Source, choose View, then the entity Requests and the view Hold dialog. Only views that are published, allow editing, and have fields in Ask user for are offered.
- Optionally choose an Execution Indicator: Blocking (people wait, and see the On execution started and On execution succeeded messages), Inform (they see progress and can carry on), or None.
Inline Entity is the other Fields Source: you describe the dialog’s fields yourself, as JSON, in Entity. Use View unless you have a reason not to; it needs no JSON and is easier to change later.
Step 3: Use what was entered
Section titled “Step 3: Use what was entered”Write it to the record
Section titled “Write it to the record”- Add Update Data Entry on Self.
- For Hold reason, choose the value type Field. In the field list, open the group named after the dialog — Put on hold — and pick its Hold reason. Do not pick Hold reason under Requests: that is the value already on the record.
- Do the same for Hold until.
- Optionally set Status to On hold with Manual.
Put it in a message
Section titled “Put it in a message”- Add Send Notification to the Requester field.
- Write the message with placeholders, for example
Your request was put on hold until {{until}}: {{reason}}. - Under Custom Variables, map each one with the type Field to the dialog’s field, as above. See Insert record values into messages.
- Save the reaction.
Step 4: Add the button
Section titled “Step 4: Add the button”- On the Buttons tab, add a button Put on hold. In Action, under Custom Action, choose Put on hold. See Add a button.
- Choose the Scope: Single Entry, Multiple Entries, or both.
- Publish the button and show it in a view. See Show the button in a view.
What people see
Section titled “What people see”- They select the button. If the button has a confirmation, it comes first. See Ask for confirmation first.
- The dialog opens, empty. It does not show the record’s current values.
- Send stays disabled until every required field is filled in.
- The action runs, with the indicator you chose.
With Multiple Entries, the dialog opens once, and the same values are used for every selected record.
Pass values without a dialog: Execute Custom Action
Section titled “Pass values without a dialog: Execute Custom Action”A Local action or External action asks for Parameters instead of showing a dialog. Another reaction calls it with Execute Custom Action and fills each parameter the same way as a field in Update Data Entry. Parameters left unbound are passed empty. See Execute Custom Action.
Check the result
Section titled “Check the result”- Open a test request and select Put on hold.
- Leave Hold reason empty: Send stays disabled. Fill both fields and send.
- The request shows the reason and the date, and the requester is notified.
- If the values did not arrive, check that each value is picked from the dialog’s group, then open the reaction’s run history. See Check that it ran.
Troubleshooting
Section titled “Troubleshooting”| Problem | What to check |
|---|---|
| The view is not offered in Fields Source | It is not published, Editing entries is off, or Ask user for has no fields. |
| The button does not offer the custom action | Its Custom action level is not UI action. |
| No dialog appears | Ask User For is off in the custom action. |
| The record keeps its old value | The action takes the value from the record’s own field, not from the dialog’s group. |
| The dialog does not show the current values | It always opens empty. To show a current value, put it in the button’s confirmation message. |
| Every selected record got the same value | That is by design: one dialog serves every selected record. Use Single Entry if each needs its own. |
See also
Section titled “See also”Platform 1.10.0 · Backend 1.11.0-alpha.11 · Frontend 1.11.0-alpha.6 · Mobile 1.10.2 · Chart 1.11.8 · Gateway 2.6.11 · MCP 0.2.0 · Grafana DS 1.2.0Docs build 2026-11-27