> For the complete documentation index, see [llms.txt](https://docs.avonnicomponents.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avonnicomponents.com/flow/component-builder/interactions-panel/refresh-all-queries.md).

# Refresh All Queries

The Refresh All Queries interaction refreshes every query component on the current screen flow or page so they display the latest information.

## Overview

The Refresh All Queries interaction is handy because it refreshes all query components on your current screen flow or page. This ensures that all components always display the latest information.

{% hint style="warning" %}
**Important Note:** The "Refresh All Queries" interaction targets components configured with a Query Data Source. If a component relies on a Variable Data Source, this action will not refresh its data.
{% endhint %}

## Configuration

### **Flow Scope**

* **Enabled:** The refresh event will be confined to the current flow, ensuring only relevant components are updated.
* **Disabled (Default):** The event will propagate through all flows currently loaded on the page, refreshing all queries within those flows.

### **Exclude Self**

* **Enabled:** The component triggering the refresh (e.g., the Data Table where the change was made) will not refresh its data query.
* **Disabled (Default):** All queries, including the one associated with the triggering component, will be refreshed.

### **Override Refresh Behavior**

* **Enabled:** The refresh uses the **Preserve Selected Items** and **Stay on Current Page** settings below instead of each component's own default behavior.
* **Disabled (Default):** Every component refreshes the way it normally does.

### **Preserve Selected Items**

Requires **Override Refresh Behavior** to be enabled.

* **Enabled:** The refreshed components keep the items the end user had selected. Only the Data Table, List and Timeline support this.
* **Disabled (Default):** The selections are reset.

### **Stay on Current Page**

Requires **Override Refresh Behavior** to be enabled.

* **Enabled:** The refreshed components stay on the page the end user was on.
* **Disabled (Default):** They return to their first page.

### How it works

1. Add the "Refresh All Queries" interaction to the desired component (e.g., a button or a successful record update action in the Data Table).
2. Configure the settings based on your needs (Flow Scope, Exclude Self, and the refresh behavior options).
3. When the interaction is triggered, all eligible components in the flow (or the entire application, depending on your settings) will automatically refresh their data queries, ensuring a consistent and accurate view of your information.

## Example

Imagine you have an Avonni Metric component displaying statistics about opportunities. When a user creates a new opportunity or modifies an existing one using an Avonni Data Table, you want the metric to update immediately to show accurate figures. The Refresh All Queries interaction makes this effortless.

## Important Considerations

* Use this interaction strategically. Refreshing all queries can be resource-intensive, so consider whether it's necessary for your specific scenario.
* If you only need to update a specific component, consider using the "Refresh Query" interaction instead.
* Experiment with the settings to find the optimal configuration for your flow's behavior.

By leveraging the Refresh All Queries interaction, you can ensure that your users always have the latest information at their fingertips, creating a more seamless and responsive experience.


---

# 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://docs.avonnicomponents.com/flow/component-builder/interactions-panel/refresh-all-queries.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.
