# Defining triggers and actions for a data store

You can define a trigger to initiate an action when an event occurs on the data store.

1. To define a trigger, in the **Page Tree,** right-click the required data

   store and from the list, select the required trigger.

![](/files/-M1ZzXy6TDdJkwH9YUOL)

The trigger is added for the data store.

2\. To define an action to be invoked for the trigger, right-click the required trigger.

![](/files/-M1ZzcLzeEv5DcEcQzA_)

The action to be invoked on the trigger is defined.

For example, if for a data store, you select **Trigger After Delete Record** as the trigger and **Confirm Message** as the action, then after every row deletion from the data store, a confirmation message will be displayed.

{% hint style="info" %}
You can define triggers and actions for all the other components in a similar manner.

Refer to the [**Working with page components**](/creating-pages/working-with-pages/working-with-page-components.md) section.
{% endhint %}


---

# 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.cloudio.io/creating-pages/working-with-pages/working-data-stores/defining-triggers-and-actions-for-a-data-store.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.
