> For the complete documentation index, see [llms.txt](https://docs.ngsurvey.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ngsurvey.com/ar/projects/import-export/xlsform/wrqh-alastbyan/awaml-tsfyh-alkhyarat-casacade.md).

# عوامل تصفية الخيارات (Casacade)

تسمح مرشحات الخيارات بتصفية الخيارات المعروضة في `select_one` أو `select_multiple` السؤال ديناميكيًا بناءً على الإجابة على سؤال سابق.

تكون مفيدة عند وجود قوائم منسدلة مرتبطة، مثل عرض المدن بناءً على البلد المحدد، أو تصفية المسميات الوظيفية بناءً على القسم.

#### كيفية عمل مرشحات الخيارات

لاستخدام مرشح خيارات، اتبع الخطوات التالية:

1. في مربع الحوار `ورقة survey` في ورقة، أضف عمودًا باسم `choice_filter`.
2. في مربع الحوار `choices` في الورقة، أضف عمودًا إضافيًا يحتوي على السمة المستخدمة للتصفية.
3. الـ `choice_filter` يجب أن يتطابق التعبير في ورقة الاستبيان مع قيمة الفلتر من الإجابة المحددة.

الصياغة (syntax) للفلتر هي:

`filter_column = ${question_name}`

هذا يقارن بين عمود في ورقة الخيارات والقيمة المحددة في سؤال سابق.

{% hint style="danger" %}
ستعمل مرشحات الخيارات فقط على select\_one إذا تم تعريفها ضمن [مجموعة](/ar/projects/import-export/xlsform/wrqh-alastbyan/almjmwaat.md) التي تعرف صفحة بمظهر field-list. لن تعمل داخل مجموعة لا تحتوي على مظهر field-list
{% endhint %}

#### مثال: البلد والمدينة

**ورقة survey**

| النوع               | الاسم   | label      | choice\_filter       |
| ------------------- | ------- | ---------- | -------------------- |
| select\_one country | country | اختر بلدًا |                      |
| select\_one city    | city    | اختر مدينة | country = ${country} |

**ورقة choices**

| list\_name | الاسم  | label         | country |
| ---------- | ------ | ------------- | ------- |
| country    | usa    | United States |         |
| country    | france | France        |         |
| city       | nyc    | New York City | usa     |
| city       | la     | Los Angeles   | usa     |
| city       | paris  | Paris         | france  |
| city       | lyon   | Lyon          | france  |

ما الذي يحدث:

1. يختار المستخدم بلدًا في السؤال الأول (مثل France).
2. يعرض السؤال الثاني (اختر مدينة) فقط المدن حيث `country` العمود في ورقة الخيارات يطابق البلد المحدد (`france` في هذه الحالة).
3. لذلك سيظهر في القائمة المنسدلة للمدينة فقط "Paris" و"Lyon".


---

# 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.ngsurvey.com/ar/projects/import-export/xlsform/wrqh-alastbyan/awaml-tsfyh-alkhyarat-casacade.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.
