> 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/experience-cloud/experience-cloud-ja/puropatipaneru/data-sources/query.md).

# クエリ

## 概要

Query Data Source を使用すると、Avonni Data コンポーネント（たとえば [**データテーブル**](/experience-cloud/experience-cloud-ja/chtoriaru/components/data-table.md), [**リスト**](/experience-cloud/experience-cloud-ja/experience-components/ax-list.md), [**ギャラリー**](/experience-cloud/experience-cloud-ja/experience-components/ax-gallery.md)、および Map など）が、Experience Cloud サイト上で Salesforce レコードデータを動的に取得して表示できます。

このデータソースは、コンテンツを Salesforce データと同期した状態に保ち、ページ上のユーザー操作に動的に応答する必要がある場合に適しています。

***

## Avonni Query Data Source とは？

Avonni Query Data Source は、Avonni コンポーネントを直接 **Salesforce オブジェクトに** 設定可能なクエリを介して接続します。概念的には SOQL に似ていますが、ビジュアルに構築されます。

Experience Cloud のコンテキストでは、次のことが可能になります。

* Salesforce レコードからの動的なデータ取得
* [**反応型の動作**](/experience-cloud/experience-cloud-ja/hajimeni/reactive-components.md) 同じページ上のコンポーネント間での

***

## クエリの作成

クエリは **Avonni コンポーネントから直接作成されます**.

新しいクエリを作成するには：

1. Avonni Data コンポーネント（たとえば **データテーブル** または **リスト**）を Experience Builder で選択します
2. コンポーネントのプロパティパネルで、 **データソース** セクション
3. 選択し **クエリ** をデータソースとして開きます
4. クエリのフィールド、フィルター、およびオプションを設定します

***

## データのフィルタリング

### クエリフィルターの設定

フィルターを使用すると、クエリによって返される Salesforce レコードを制御できます。これは SOQL の `WHERE` 句に似ています。

フィルターはクエリエディタで直接設定され、そのクエリを使用するすべてのコンポーネントに適用されます。

***

### フィルターの種類

**静的フィルター**

静的フィルターは、設定時に定義された固定値を使用します。

例：

* フィールド： `Location`
* 演算子： `equals`
* 値： `New York`

静的フィルターは、クエリを編集しない限り変更されません。

***

## 反応型クエリ

**反応型クエリとは？**

反応型クエリを使用すると、Experience Cloud ページ上の Avonni コンポーネントが、ユーザー操作や他のコンポーネントの変更に応じて自動的に更新されます。

これにより、ページの再読み込みやカスタムコードなしで、非常に動的でインタラクティブなページを実現できます。

<a href="/experience-cloud/experience-cloud-ja/hajimeni/reactive-components.md" class="button primary" data-icon="square-info">詳細を見る</a>

***

## Query Data Source を使用する場面

次の場合に Query Data Source を使用します。

* データを Salesforce レコードと同期した状態に保つ必要がある
* コンテンツがユーザー操作に反応する必要がある
* 複数のコンポーネントで同じデータセットを共有する必要がある
* フィルタリングおよびグループ化のロジックが必要

静的なコンテンツや編集中心のコンテンツには、代わりに [**手動**](/experience-cloud/experience-cloud-ja/puropatipaneru/data-sources/manual.md) または [**CMS Collection**](/experience-cloud/experience-cloud-ja/puropatipaneru/data-sources/cms-collection.md) データソースの使用を検討してください。


---

# 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/experience-cloud/experience-cloud-ja/puropatipaneru/data-sources/query.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.
