# 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.

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M1ZzLvmGL2416ZaY9Vw%2F-M1ZzXy6TDdJkwH9YUOL%2FTriggers.png?alt=media\&token=2782c5b4-fd84-4b30-8544-c03771bbb866)

The trigger is added for the data store.

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

![](https://1117313960-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LzMJAXNyRSI4WE3Jt4z%2F-M1ZzLvmGL2416ZaY9Vw%2F-M1ZzcLzeEv5DcEcQzA_%2FActions.png?alt=media\&token=3e90c747-061e-4967-b4cf-b90760ec9569)

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**](https://docs.cloudio.io/creating-pages/working-with-pages/working-with-page-components) section.
{% endhint %}
