Skip to content

Commit b0d99a5

Browse files
authored
Merge pull request #522 from SuffolkLITLab/add_i_and_x_workshop
Add the i and x workshop video
2 parents 4d41182 + e4e7aee commit b0d99a5

File tree

1 file changed

+17
-23
lines changed

1 file changed

+17
-23
lines changed

docs/authoring/customizing_interview.md

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -443,17 +443,10 @@ A more complete guide to [helping your user](../coding_style/yaml_interface.md#a
443443
Here are a few reasons that a question may be getting
444444
asked that you did not expect:
445445

446-
1. You may have referenced a built-in question from the
447-
question library.
448-
1. The question might be needed to ask another question,
449-
such as a name to personalize a question, or an address
450-
to locate a court.
451-
1. You may have made a typo or mistake with your variable
452-
names, and ended up asking something that is also defined
453-
by an Assembly Line question. This could lead to 2 or more
454-
very similar questions.
455-
1. You might not have defined something, like the party roles,
456-
that your interview now needs to know in order to make sense.
446+
1. You may have referenced a built-in question from the question library.
447+
2. The question might be needed to ask another question, such as a name to personalize a question, or an address to locate a court.
448+
3. You may have made a typo or mistake with your variable names, and ended up asking something that is also defined by an Assembly Line question. This could lead to 2 or more very similar questions.
449+
4. You might not have defined something, like the party roles, that your interview now needs to know in order to make sense.
457450

458451
### Understanding the question library
459452

@@ -484,9 +477,7 @@ Here's how:
484477

485478

486479
:::note About `generic object`
487-
The [`generic object`](https://docassemble.org/docs/modifiers.html#generic%20object) modifier is a special way to make
488-
one question work for many different objects, like people
489-
or lists of people.
480+
The [`generic object`](https://docassemble.org/docs/modifiers.html#generic%20object) modifier is a special way to make one question work for many different objects, like people or lists of people.
490481
:::
491482

492483
When you customize a question from the question library,
@@ -498,10 +489,7 @@ To make it specific:
498489
1. Replace `x` with your variable name.
499490
1. Customize the `question` and `subquestion` as needed.
500491

501-
For example, suppose your interview asks for a list of
502-
`guardians`. There is no special question about `guardians`
503-
in the question library, so your interview will use the `generic object`
504-
version of the question, which looks like this:
492+
For example, suppose your interview asks for a list of `guardians`. There is no special question about `guardians` in the question library, so your interview will use the `generic object` version of the question, which looks like this:
505493

506494
```yaml
507495
---
@@ -545,13 +533,19 @@ fields:
545533
A **specific** version of a question is always used
546534
before the **generic object** version.
547535

548-
:::note About the variable `i`
549-
Just like `generic object` works for any object,
550-
the variable `i` (and other [`index variables`](https://docassemble.org/docs/fields.html#index%20variables)) lets you write a question for any item
551-
in a list. Using a **specific** number (typically, just the first, or 0th item is treated specially) overrides the
552-
one that uses the letter `i`.
536+
:::note About the variable `i`
537+
Just like `generic object` works for any object, the variable `i` (and other [index variables](https://docassemble.org/docs/fields.html#index%20variables)) lets you write a question for any item in a list. Using a **specific** number (typically, just the first, or 0th item is treated specially) overrides the one that uses the letter `i`.
553538
:::
554539

540+
<details>
541+
<summary>More about `i` and `x`</summary>
542+
543+
Learn more about `i` and `x` and how they work in Docassemble code in this Document Assembly Line workshop:
544+
545+
<iframe width="560" height="315" src="https://www.youtube.com/embed/sRfo3ZhbbnY?si=YLwmuxwi4qb3DZLo" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
546+
</details>
547+
548+
555549
### Learning why a question got asked
556550

557551
Every screen in Docassemble is asked for a reason, and you can

0 commit comments

Comments
 (0)