# 条件付きアクション

Adaloを使用すると、特定のルールが適用される場合にのみアクションにロジックを追加できます。これは、[コンポーネントの表示を設定する](/ja/component-basics/changing-a-components-visibility.md)手順と非常に似ています。

顧客が入力した郵便番号が配達可能な郵便番号であるかに応じて、異なるページにリンクする例があります。

もう1つの例は、ユーザーが他のユーザーをフォローおよびアンフォローできるようにするトグルを設定する場合です。この例は、[他のユーザーをフォローできるようにする方法](/ja/how-to/how-to-allow-users-to-follow-others.md)チュートリアルで見つけることができます。

### アクションを特定のタイミングでのみ発生させる設定

アクションの条件を設定するには、まずアクションを設定する必要があります。さまざまな種類のアクションを設定する詳細については、特定の種類のアクションのヘルプマニュアルを参照してください。

1. コンポーネントを選択します。
2. アクションを設定します。
3. アクションを選択します。
4. *Show Advanced*を選択します。
5. *When does this happen?* の下で、*Always*と書かれているところの下にあるドロップダウンを選択し、*Sometimes*に変更します。

![](/files/9wzG7j16O5593QAM55PK)

### 条件の設定

条件を設定するには、条件が適用されるプロパティ、比較タイプ、比較値の3つのパートがあります。

{% hint style="info" %}
複数の条件付きアクションを持つリンクアクションを使用する場合、そのリンクの1つは 'fallback' オプションとして非条件付きアクションである必要があります。
{% endhint %}

#### プロパティを選択

条件が適用されるプロパティを選択する際に、現在のデータ、現在の画面のフォーム入力、日付/時刻、コレクション全体、コレクションの数のいずれかを選択できます。

#### 比較タイプを選択

比較タイプはドロップダウンで設定されます。選択したプロパティに応じて、比較タイプのオプションが異なる場合があります。

{% hint style="info" %}
**テキスト** の場合、利用可能なオプションは以下の通りです：

*Is equal to, Is not equal to, Contains*

**数値** の場合、利用可能なオプションは以下の通りです：

*Is equal to, Is not equal to, Is greater than, Is less than, Is greater than or equal, Is less than or equal and Is between*

**トグル** の場合、利用可能なオプションは以下の通りです：

*True, False*

**日付と時刻** の場合、利用可能なオプションは以下の通りです：

*Is after, Is before, Is between*

**画像** の場合、利用可能なオプションは以下の通りです：

*Is equal to, Is not equal to*

**ファイル** の場合、利用可能なオプションは以下の通りです：

*Is equal to, Is not equal to*

**住所** の場合、利用可能なオプションは以下の通りです：

*Is within, Is not within- Miles of, Kilometers of*
{% endhint %}

#### 比較値を設定

比較値は、選択した比較に応じて、プロパティが 'contain, not contain, be equal to or not be equal' を指定します。

1. *This Action will only happen if...*&#x306E;下で、*Select*と書かれているところの隣にあるドロップダウンを選択します。
2. プロパティを選択します。
3. 比較値を選択します。
4. 比較値を設定します
5. *Done*を選択します。

![](/files/MzaPowqHxyl62ekyCgpn)


---

# 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://help.adalo.com/ja/action-basics/conditional-actions.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.
