# Actions settings

Each action has a [Setup step](#setup-step-settings) and a [Finish step](#finish-step-settings) that contain additional settings you can configure. In this article, we'll explore these steps and their settings in more details.

## Setup step settings

### Trigger

This section contains automatic action triggers you can turn on/off. You can find more information about them on [this page](/concepts/actions/action-basics.md#triggering-actions).

### Execution

* **Delay action execution for (ms)** - you can specify the delay before your actions are executed (in ms) to prevent them from running too often.
* **Preserve action value** - if selected, global actions will retain their values, meaning that these values are saved and remain unchanged during page navigations; and the action is not executed again.\
  This feature is particularly useful when you want to store global values that can be reused throughout the user's session. Nonetheless, you have the option to deselect this setting if you prefer the action to refresh its value when you next open the page.

![](/files/GP1ZI1empFhvINHd39Th)

### Dialogs

Turn on the **Show a confirmation alert before execution** toggle and specify your message to configure a confirmation dialog for your users. It may be especially useful when you want to prevent users from executing specific actions by mistake.

![](/files/MkjrQ2aaBYOknTx6HhuY)

## Finish step settings

### Chain actions

Refer to [this page](/concepts/actions/action-basics.md#reusing-actions) for more information on configuring chain actions.

### Toasts

You can configure *Success* or *Error* toasts for your actions. The Error toast is on by default.

For each toast, you can modify the message displayed, specify its duration or select the **Hide notification only when clicked** checkbox.

![](/files/BcyVgyFV0f17JtSiBCfy)

You can also *use the action result in the toasts*, for example:

* Notify about a successful item addition:

`New customer created {{actions.yourAction.data.id}}`

* Show an error for a failed action:

`Action failed with an error {{actions.yourAction.error}}`

{% @arcade/embed flowId="c0d8n9Npkl4q3oB7DUmF" url="<https://app.arcade.software/share/c0d8n9Npkl4q3oB7DUmF>" %}

#### Customizing error messages

You might want to create customized error messages that will give your users more clarity about the error. In order to do that, you can use the `throw new Error` code and customize the message text.

Let's say you want to throw an error that doesn't allow editing a row in the table on a certain condition. Here's how you can do that:

1. Create a new action of the **JavaScript Code** type.
2. Specify the following code:

```javascript
if (!{{state.allowRowEdit}}) {
    throw new Error ('Row editing is not allowed')
}
```

{% hint style="warning" %}
If you are using one of the predefined actions (Load Table, Create Row, etc.), then create a multistep action with the *JavaScript Code* step as the first and the *predefined action* as the second step.
{% endhint %}

<figure><img src="/files/3DGNrXwCJk7tOjS9nf98" alt=""><figcaption></figcaption></figure>

3. For the **Finish** step, navigate to the Error toast, and refer to the error message as `{{actions.yourAction.error.message}}`.

<figure><img src="/files/GnibyudSrjKJhNNMZ218" alt=""><figcaption></figcaption></figure>

Now, anytime the condition is met and the action fails, the user will see a customized error message.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.uibakery.io/concepts/actions/additional-action-settings.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
