> For the complete documentation index, see [llms.txt](https://help.adalo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.adalo.com/actions/creating-an-action-that-triggers-data-edit.md).

# Change Data

Actions can be used to alter your app's database— either by creating, updating, or deleting records.

### Create Action

Most of the time, when you want users to create new records in your database, you will take them to a screen with a [Form](/component-basics/forms-and-fields/how-to-create-and-edit-forms-and-fields.md) where they can fill out information about the record they are creating.  However, sometimes you might want the user to click a button that automatically creates the new record without the user having to fill out a form.  In the example below, a user is viewing details about a Trip they are planning and the app let's them add new Days to their Trip.  Every time the user clicks the "+ DAY" button, another day is automatically added to their trip

![](https://3467607506-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhGHkPsv15svPIU5I7C%2F-LmjqasxjfrkzRXEx8IK%2F-LmjsybDtIRVfIqgUwzr%2FScreenshot%202019-08-20%20at%2011.37.03%20AM.png?alt=media\&token=610c0fd7-1674-46b9-993e-e2b67e3005b6)

To configure your Create Action

1. Select the collection from your database that the Create Action will add a new record to
2. You will then be able to specify how all of the properties for the new record should be created.  You can use an combination of Text, Magic Text, Numbers, and even Formulas for most properties.  For relationships, you can select what they new record should be related to.  In this example, we've specified that the new Day record should be related to the Current Trip the user is viewing.

### Update Action

As with creating new records, updating a record is often done with a [Form](/component-basics/forms-and-fields/how-to-create-and-edit-forms-and-fields.md).  However, there are times when you want the press of a button to automatically change the property on of a record, without the users having to manually make the changes in a form.  In the example below, clicking a "Publish" button triggers an Update Action that automatically changes the current Trip's "Is Published" property from False to True.&#x20;

![](https://3467607506-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhGHkPsv15svPIU5I7C%2F-LinQDvp32Gi6rvn7dJR%2F-LinUuG9bSG5oB_Zf3JG%2FGif%201%20Update%20Data.gif?alt=media\&token=d2689a7f-67e4-4c3e-bd8d-55b9e90cf9ab)

To configure your Update Action

1. Select the available record that the Update Action will affect.
2. You will then be able to specify how all of the properties for that record should be changed.  You can use an combination of Text, Magic Text, Numbers, and even Formulas for most properties.  For relationships, you can select what they new record should be related to.
3. For properties that you don't want to change, you can simply leave them set as "No Change"

### Delete Action

Delete actions are used to delete records from your database (no surprise there).  They can be added to any kind of button as well as icons that are part other components like App Bars and Lists.

![](https://3467607506-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhGHkPsv15svPIU5I7C%2F-LjHR37jT0TiSrufcCQi%2F-LjHR5aN3KpAGOFYvXhe%2FGif%201%20Delete.gif?alt=media\&token=b4984e29-2234-4d5e-8ff5-773cb549b9eb)

To configure your Delete Action, simply choose which record to delete.  If the Delete Action is deleting an item inside of a List component, that row will be automatically removed from the list as soon as the user click the icon that you added the Delete Action to.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.adalo.com/actions/creating-an-action-that-triggers-data-edit.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
