Skip to content

Commit ee766e0

Browse files
Minor edits
1 parent e0f8d5d commit ee766e0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

source/choice_filters_xls.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ To add static choice filters in XLSForm:
2828
- This value will act as the filter. It can be any word or number.
2929
4. In the `survey` worksheet, add a **choice_filter** column. This column will contain the **choice filter expression** used to filter the option choices.
3030
- The choice filter expression in its most basic form will take the format: **filter = ‘value’.**
31-
- For example, **q2 = ‘yes’** will retain all choices with **yes** in the `q2` column.
31+
- For example, `q2 = ‘yes’` will retain all choices with **yes** in the `q2` column.
3232

3333
### Example
3434

@@ -68,8 +68,8 @@ To add dynamic choice filters in XLSForm:
6868
- It can be helpful to name this column the same as the **parent question.**
6969
3. In the filter column, enter the **name of the choice** from the parent list that each option in the child list corresponds to.
7070
4. In the `survey` worksheet, add a **choice_filter** column. This column will contain the **choice filter expression** used to filter the option choices.
71-
- If the parent question is `select_one`, the choice filter expression will be **filter_column = ${question_name}**, where `question_name` refers to the parent question.
72-
- If the parent question is `select_multiple`, the choice filter expression will be **selected(${question_name}, filter_column).**
71+
- If the parent question is `select_one`, the choice filter expression will be `filter_column = ${question_name}`, where `question_name` refers to the parent question.
72+
- If the parent question is `select_multiple`, the choice filter expression will be `selected(${question_name}, filter_column)`.
7373

7474
When a respondent selects an option in the parent question, the choice list for the child question will be filtered to only include the corresponding choices.
7575

@@ -82,7 +82,7 @@ In the example below, `continent` is the **parent question** and `country` is th
8282
| type | name | label | choice_filter |
8383
|:------------------|:---------|:----------|:--------------------|
8484
| select_one continent | continent | Continent | |
85-
| select_one country | country | Country | continent = ${continent} |
85+
| select_one country | country | Country | **continent = ${continent}** |
8686
| survey |
8787

8888
**choices worksheet**
@@ -102,7 +102,7 @@ In the example below, `continent` is the **parent question** and `country` is th
102102
You can create more advanced choice filters by using logical operators, mathematical operators, functions, and regex in your choice filter expressions. This allows for highly customized and precise filtering of options, tailoring the form to specific data collection requirements and respondent characteristics.
103103

104104
<p class="note">
105-
<strong>Note:</strong> In advanced choice filter expressions, the `name` column of the `choices` spreadsheet can be used as a filter column.
105+
<strong>Note:</strong> In advanced choice filter expressions, the <code>name</code> column of the <code>choices</code> worksheet can be used as a filter column.
106106
</p>
107107

108108
Examples of advanced choice filter expressions in XLSForm include:
@@ -161,7 +161,7 @@ In the resulting form, `Q2` will display only the options chosen in `Q1`, as sho
161161

162162
<details>
163163
<summary><strong>Duplicate option names in a list</strong></summary>
164-
If your choice list includes duplicate option names (for example, if the same neighborhood name is present in different cities), <a href="https://support.kobotoolbox.org/form_settings_xls.html">enable choice duplicates</a> in the `settings` worksheet by setting <code>`allow_choice_duplicates`</code> to <code>`yes`</code>.
164+
If your choice list includes duplicate option names (for example, if the same neighborhood name is present in different cities), <a href="https://support.kobotoolbox.org/form_settings_xls.html">enable choice duplicates</a> in the <code>settings</code> worksheet by setting <code>allow_choice_duplicates</code> to <code>yes</code>.
165165
</details>
166166

167167

0 commit comments

Comments
 (0)