Skip to main content
Version: 1.28 (Current)

Display Error Message

Audience: Low-code Engineers

Skill Prerequisites: HTML, Actions, Conditions

Shows an error message to the user and ends execution. Unlike Display Message, the form or listing stays on screen, so the user can fix the problem and try again. The message can contain HTML and tokens.

It's available in Forms, Listings and User Guides.

Typical Use Cases​

  • Stop a submission when a business rule fails, for example The end date must be after [StartDate].
  • Show an error returned by an earlier action, such as a Server Request
  • Block a Listing button when the user isn't allowed to run it on the selected item
  • Show a permission error instead of the form, from the form's On Init event

Don't use it to​

  • Validate a single field. Use the field's own validation settings, which mark the field and show the message next to it.
  • Change the message shown when an action fails. Use the action's Error Message setting. See Common Parameters.
  • Fail a workflow or API call, or trigger On Error actions. Use Throw Exception instead.
  • Debug. Use Log Error instead.
Action NameDescription
Display MessageShows a normal message and ends execution. On submit, it replaces the form.
Throw ExceptionRaises an error, with separate messages for administrators and end users.
Display Toast Message And Stop ExecutionShows a small popup that hides on its own and ends execution.
Display Toast Message And Continue ExecutionShows a small popup that hides on its own, then runs the next actions.
Stop ExecutionEnds execution without showing anything.
Log ErrorWrites a message to the log without stopping.

Input Parameter Reference​

ParameterDescriptionSupports TokensDefaultRequired
MessageThe error to show. It's a rich text editor, so it can contain HTML. Use the Append Field dropdown to add a field's name and token, or Append All Fields to add all fields. Fields are added at the end of the existing content.Yesempty stringNo
Allow HTML code in MessageListings only. When on, token values are inserted as-is. When off, token values are HTML-encoded, so HTML in them is shown as text. The HTML you type in Message itself is rendered either way.NotrueNo

Where the message appears​

Where it runsWhat the user sees
Form, button actionsA red error box under the form. The form stays on screen and keeps its values. The error is cleared the next time a button is clicked.
Form, On InitThe form isn't shown. The error is shown instead, in a red box.
Listing, listing buttonA line under the listing, starting with Error:.
Listing, item buttonA red message on the item's row. The item's buttons are hidden while it's shown.
User Guide, step buttonThe step stays open. The error is added to the step's popup, in a red box, replacing any earlier message. The button can be clicked again.

Module differences​

ModuleParametersBehavior
FormsMessageError box under the form. Inside Execute Actions, Repeat or Execute Actions For Each List Entry, the error goes straight to the user. Their On Error actions don't run.
ListingsMessage, Allow HTML code in MessageError line under the listing or on the item. Inside Execute Actions, Repeat or Execute Actions For Each List Entry, the message becomes an error, so their On Error actions run with the message in [ExceptionMessage].
User GuidesMessageError box in the step's popup. Inside Execute Actions, Repeat or Execute Actions For Each List Entry, it behaves like in Listings.

Display Error Message isn't available in API endpoints or workflows. Use Throw Exception there.

Compared with similar features​

FeatureDifference
Field validationMarks the field that's wrong and shows the message next to it. Display Error Message shows one message for the whole form and doesn't mark any field.
Throw ExceptionRaises a real error, logged and caught by On Error actions. It has separate messages for administrators and end users. Display Error Message shows the same message to everyone.
Error Message settingReplaces the text shown when an action fails. It isn't an action.

Considerations​

  • Final action. No actions after Display Error Message run. Give it a condition, or it always stops.
  • The form stays usable. The user can change the fields and click the button again.
  • Token values aren't encoded in Forms and User Guides. If a value typed by the user contains HTML, it's rendered as HTML. In Listings, turn off Allow HTML code in Message to encode token values.
  • Scripts don't run in form error messages. In Listings, <style> tags are removed. Use class attributes and CSS instead.
  • reCAPTCHA fields on the form are reset when the error is shown.
  • Everyone sees the same text. Keep technical details, such as SQL or IDs, out of the message.

Examples​

tip

To understand how to use the below examples, please see Running Examples.

1. Block the form for users without permission​

Add this action to the form's On Init event, after an action that sets an IsAllowed token, such as a SQL query that checks the user's permissions. When IsAllowed is False, the form isn't shown and the error is shown instead.

{
"Title": "Display Error Message",
"ActionType": "ShowError",
"Description": "User permission error",
"Condition": "[IsAllowed] == \"False\"",
"Parameters": {
"Message": "<p>You don't have permission to use this form.</p>"
}
}

2. Show an error returned by an API​

Add this action after a Server Request that sets the ApiStatus and ApiError tokens. When the call failed, the error is shown under the form and the actions after it, such as saving the data, don't run.

{
"Title": "Display Error Message",
"ActionType": "ShowError",
"Description": "Show the API error",
"Condition": "[ApiStatus] == \"Failed\"",
"Parameters": {
"Message": "<p>We couldn't process your request: [ApiError]</p>"
}
}

3. Block a Listing item button​

Add this action to a Listing item button. When the item's Status is Closed, an error is shown on the item's row.

{
"Title": "Display Error Message",
"ActionType": "ShowError",
"Description": "Closed items can't be edited",
"Condition": "[Status] == \"Closed\"",
"Parameters": {
"Message": "<p>Item [Title] is closed and can't be edited.</p>",
"AllowHtml": "false"
}
}

Revised 09/27/2026