# Cascade Updates

When updating a database, it is essential to also update all related and dependent records to maintain data consistency, accuracy, and integrity.&#x20;

PowerTable allows you to automatically cascade updates across all related tables using an automation workflow.

1. Select **Setup > Automations.**

<figure><img src="https://docs.powertable.com/~gitbook/image?url=https%3A%2F%2F1781349671-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FKyXRCFh0c08ryiUFvyMV%252Fuploads%252FbpcuXHLQOe98C0kayGE7%252Fimage.png%3Falt%3Dmedia%26token%3D55273077-15f0-40af-babf-0e349fb7e1e7&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=306f75e2&#x26;sv=2" alt=""><figcaption><p>Setup automation</p></figcaption></figure>

2. Create a new automation workflow by clicking on **Create.**

<figure><img src="https://docs.powertable.com/~gitbook/image?url=https%3A%2F%2F1781349671-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FKyXRCFh0c08ryiUFvyMV%252Fuploads%252FacsKKHUFNJP6pgRu4JHg%252Fimage.png%3Falt%3Dmedia%26token%3D0bf78eec-21d1-4870-90c9-d93ec3d2657f&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=163211d9&#x26;sv=2" alt=""><figcaption><p>Create Automation</p></figcaption></figure>

3. Click **Add Trigger** or directly select any of the suggested triggers to configure the triggering event.

<figure><img src="https://docs.powertable.com/~gitbook/image?url=https%3A%2F%2F1781349671-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FKyXRCFh0c08ryiUFvyMV%252Fuploads%252FGIhgBFZEWeGakoyHtJIK%252Fimage.png%3Falt%3Dmedia%26token%3Dc320e677-ac6d-4305-9f2f-27481753bc67&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=efc68397&#x26;sv=2" alt=""><figcaption><p>Add Trigger</p></figcaption></figure>

4. Let us assume you need to update relevant records in another table whenever a new record is created. In this case, you can select the trigger, 'When a record is created'. A trigger event is added.

<figure><img src="https://docs.powertable.com/~gitbook/image?url=https%3A%2F%2F1781349671-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FKyXRCFh0c08ryiUFvyMV%252Fuploads%252FPuu4JQQIBefUtUwinf79%252Fimage.png%3Falt%3Dmedia%26token%3D2b631c86-916b-4874-8786-5b7915b5e9a1&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=927015de&#x26;sv=2" alt=""><figcaption><p>Trigger event added</p></figcaption></figure>

5. You can define additional properties and add conditions to further customize your trigger and make it more specific.

{% hint style="info" %}
You can add multiple conditions and combine them using AND/OR, for an event to initiate the action.
{% endhint %}

6. Click **Add action** and then choose the required database action that you want to perform. Let's update a record in another table whenever a new record is created in the current table.

<figure><img src="/files/k28tpCDFekrTJpV2Al60" alt=""><figcaption><p>Update record in another table</p></figcaption></figure>

7. Add the connection information, schema, and table name for the table you want to update simultaneously. You can specify any conditions, such as updating only certain records in the table.

<figure><img src="/files/7XEtmXiT9txM2JuNWKJi" alt=""><figcaption><p>Update table details and conditions to update</p></figcaption></figure>

8. Add the required row values to be updated in the table.

<figure><img src="/files/wMQqSuKnkV6yOUrBhkP1" alt=""><figcaption><p>Add row values</p></figcaption></figure>

9. Click **Save Changes** after configuring the row values.

<figure><img src="/files/3BiP2jCktSYM55Wrf8lh" alt=""><figcaption><p>Save configuration</p></figcaption></figure>

10. The automation workflow is now set up successfully. You can use the pencil icon to name this workflow for easier identification. You can also add more actions to this cascading update event, such as sending an email or a Microsoft Teams message.

<figure><img src="/files/FJNQWwtNKyYuC0xS7rJN" alt=""><figcaption><p>Workflow automated</p></figcaption></figure>


---

# 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.powertable.com/explore-powertable/automation/cascade-updates.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.
