# Reloading data

The *Qommentary Writeback* extension allows you seamlessly reload writeback data and update your application in real-time.

There is 3 ways of reloading data:

1. Triggering reloads manually using Qommentary Writeback
2. Triggering reloads automatically when you save data using Qommentary Writeback
3. Setting up a reload Task using the QMC

If you wish to trigger reloads using the Qommentary Writeback extension, first you need to enable app reloads.

### Enabling app reloads

1\. Edit your sheet\
2\. Expand the **Reload** section

<div align="left"><img src="https://1677646431-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M43RhGzV8Plu0tfknia%2F-MZ8i5lEtxMrQp68SZKw%2F-MZ8iVd0o9O9tnC2oqaW%2Fimage.png?alt=media&#x26;token=5628d8bc-6fea-42ad-ae96-1a187dd1a101" alt=""></div>

3\. Click on the switch control to *Enable app reload*

<div align="left"><img src="https://1677646431-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M43RhGzV8Plu0tfknia%2F-MZ8i5lEtxMrQp68SZKw%2F-MZ8kWkUDgc2tCq5eMdx%2Fimage.png?alt=media&#x26;token=dc5f7083-e864-4f9d-a462-2ae3fce3c8dd" alt=""></div>

### Reload triggers

When app reload is enabled, saving data will automatically trigger an application reload.&#x20;

If you wish to disable automatic trigger and allow users to manually reload the application when desired, please follow these steps:

1\. Edit your sheet\
2\. Expand the **Reload** section

<div align="left"><img src="https://1677646431-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M43RhGzV8Plu0tfknia%2F-MZ8i5lEtxMrQp68SZKw%2F-MZ8mgGd9sQqniOmWjlQ%2Fimage.png?alt=media&#x26;token=d9a17b8c-86e9-43c7-ad2c-e37f00bf47d5" alt=""></div>

3\. Click on **Manual** button

<div align="left"><img src="https://1677646431-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M43RhGzV8Plu0tfknia%2F-MZ8i5lEtxMrQp68SZKw%2F-MZ8my_0XMY9F8VLuxGK%2Fimage.png?alt=media&#x26;token=15a55329-a409-43c0-aaed-32afd0f9dc4e" alt=""></div>

A Reload app button will now be visible in the actions bar:

<div align="left"><img src="https://1677646431-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M43RhGzV8Plu0tfknia%2F-MZ8i5lEtxMrQp68SZKw%2F-MZ8nbjP38r2pgdPkx1_%2Fimage.png?alt=media&#x26;token=9c9319cd-60e5-496c-8f92-4cfd6b40525c" alt=""></div>

### Reload types

When reloading writeback data, there's two (2) types of data reloads: partial and full.

By default, a partial application reload is executed. A *partial reload* keeps all tables in the data model and then executes only **Load** and **Select** statements preceded by an **Add**, **Merge**, or **Replace** prefix.

If instead you wish to execute a full application reload, just check the **Full** option:

<div align="left"><img src="https://1677646431-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M43RhGzV8Plu0tfknia%2F-MZ8i5lEtxMrQp68SZKw%2F-MZ8r5Whg1wTXT6SlY6L%2Fimage.png?alt=media&#x26;token=d4bffedd-d2b3-4d50-9d30-a9f3f7623ffa" alt=""></div>

### Reload security rules

By default, Qlik Sense users do not have permission to trigger application reloads. To ensure a seamless user experience when working with Qommentary Writeback, security rules need to be setup granting users permissions to access the load script on the published application.

{% hint style="info" %}
In order for this feature to function correctly, users will need access to **all data connections** used in the application.
{% endhint %}

#### Reload Access Writeback (App)

<figure><img src="https://1677646431-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M43RhGzV8Plu0tfknia-1588840334%2Fuploads%2FhhCbvQXMuewBZ0RrCQxW%2Fimage.png?alt=media&#x26;token=034aee8e-c119-41d6-a36e-958e62222659" alt=""><figcaption></figcaption></figure>

| **Name**            | Reload Access Writeback (App)                                       |
| ------------------- | ------------------------------------------------------------------- |
| **Resource filter** | App\_\*                                                             |
| **Actions**         | Read, Update                                                        |
| **Conditions**      | resource.stream.HasPrivilege("read") and user.roles="WritebackUser" |

#### Reload Access Writeback (App Script)

<figure><img src="https://1677646431-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M43RhGzV8Plu0tfknia-1588840334%2Fuploads%2FqjSYK9hCP1UxneJMs7e6%2Fimage.png?alt=media&#x26;token=7f1e2284-b5cb-4d7e-ac65-3fcd479d38f6" alt=""><figcaption></figcaption></figure>

| **Name**            | Reload Access Writeback (App Script)                                                                        |
| ------------------- | ----------------------------------------------------------------------------------------------------------- |
| **Resource filter** | App.Object\_\*                                                                                              |
| **Actions**         | Read                                                                                                        |
| **Conditions**      | resource.app.HasPrivilege("read") and resource.objectType = "app\_appscript" and user.roles="WritebackUser" |
