Skip to main content
Version: 1.28 (Current)

Common Parameters for All Actions

Audience: Low-code Engineers

Skill Prerequisites: Tokens

Every action in Plant an App has three settings in addition to its own parameters: Description, Error Message and Condition. They aren't repeated in each action's Input Parameter Reference, so they're documented here once.

Common Input Parameter Reference​

ParameterDescriptionSupports TokensDefaultRequired
DescriptionA short note that explains what the action is for. It's shown on the collapsed action, so you can read the Action Stack without opening each action.Noempty stringNo
Error MessageThe message shown to the user if this action fails. If it's empty, a default message is shown. See Error Message.Yesempty stringNo
ConditionAn expression that decides whether the action runs, for example [Status] == "Approved". If it's empty, the action always runs. See Condition.Yesempty stringNo

Description​

A good description says why the action is there, not just what type it is. Compare:

Less usefulMore useful
Run SQLLoad the customer's open orders into [OrdersList]
Send emailNotify the manager when the request is over $5,000

The description is also available as the [ActionDescription] token in the On Error actions of an API endpoint, which makes error logs easier to read.

Error Message​

When an action fails, the remaining actions don't run and the module shows an error. Error Message replaces the default text with your own, for example We couldn't save your order [OrderId]. Please try again later. Tokens are replaced when the error happens.

What's shown depends on where the action runs and who the user is:

WhereError Message filled inError Message empty
FormYour message. Module administrators also see the technical details below it.Users see a friendly message from the action, if it provides one, otherwise There was an error with the form. Please contact the administrator or check logs for more info. Module administrators see the technical details.
GridYour message. Module administrators also see the technical details below it.A friendly message from the action, or a generic message. Module administrators also see the technical details.
API endpointYour message is returned to the caller. Superusers also get the technical details.The error's own message is returned to the caller.

In an API endpoint with On Error actions, the message isn't returned automatically. Instead, the On Error actions run with these tokens:

TokenContains
[ErrorMessage]Your Error Message, or the error's own message if Error Message is empty
[ActionId]The ID of the action that failed
[ActionName]The type of the action that failed, for example Run SQL Query
[ActionDescription]The Description of the action that failed
[ErrorType]The type of the error
[StackTrace]The technical details of the error
tip

Keep technical details, such as SQL or server names, out of Error Message. Administrators already see them, and other users shouldn't.

Condition​

The condition is checked just before the action runs. If it's false, the action is skipped and the next action runs. Skipping an action isn't an error.

How the condition is evaluated​

  1. Tokens are replaced. Each token's value is put in quotes, so [Status] == "Approved" becomes "Approved" == "Approved". A token that doesn't exist becomes an empty string "".
  2. Simple values are checked. If the result is true or 1, the action runs. If it's false, 0 or empty, the action is skipped. This means a condition that's just a token, such as [IsVip], works when the token holds true/false or 1/0.
  3. Anything else is evaluated as an expression. The action runs only if the expression is true. If the expression can't be evaluated, the action fails with There was an error evaluating conditional expression, and administrators see the expression after tokens were replaced.

Operators​

OperatorMeaningExample
==Equal[Status] == "Approved"
!=Not equal[Country] != "US"
> >= < <=Greater than, less than[Quantity] > 10
&&And[Status] == "Approved" && [Amount] >= 5000
||Or[Role] == "Manager" || [Role] == "Director"
!Not, for a token that holds true or false![IsLocked]
( )Grouping([Type] == "A" || [Type] == "B") && [Active] == "true"
+ - * / %Arithmetic[Price] * [Quantity] > 1000

You can also call text methods on a value, for example [Email].EndsWith("@plantanapp.com") or [Tags].Contains("urgent"). Don't put quotes around the token, because its value is already quoted.

Comparing numbers​

Token values are always text. When you compare a token with a number, such as [Quantity] > 10, the text is converted to a number first, so the comparison works as expected.

Comparing two tokens with >, <, >= or <= doesn't work, because both sides are text. Do the comparison in an earlier action instead, for example with Run SQL Query, and use its true/false result as the condition.

Examples​

GoalCondition
Run only when a checkbox is checked[AgreeToTerms]
Run only when a field has a value[Phone] != ""
Run only for new records, when the ID in the query string is empty[QueryString:id] == ""
Run only for large orders from one region[Total] >= 1000 && [Region] == "EMEA"
Run only when a previous action found a known error in a web service response[ApiResult:status] == "error"

Tips​

  • Put text values in quotes. Write [Status] == "Approved", not [Status] == Approved.
  • To stop running an action for now, disable it instead of adding a condition such as false. Disabled actions are skipped but keep their settings.
  • Conditions are checked every time the action runs. Inside a loop, such as Execute Actions for each List Entry, the condition is checked for each item.
  • To stop the remaining actions, add a condition to Stop Execution or Throw Exception.

In action JSON​

When you import an action, the common parameters sit next to Parameters, not inside it. See Running Examples.

{
"Title": "Run SQL Query",
"ActionType": "RunSql",
"Description": "Mark the order as approved",
"Condition": "[Status] == \"Approved\" && [Total] >= 1000",
"ActionErrorMessage": "We couldn't approve order [OrderId]. Please try again later.",
"Parameters": {
"SqlQuery": "UPDATE Orders SET Approved = 1 WHERE OrderId = [OrderId]"
}
}

Revised 09/26/2026