Skip to content

Commit

Permalink
Add info about accessing a total row cell from expressions (fix #7393)
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanTsukanov committed Nov 29, 2023
1 parent 237c153 commit 0d9caa1
Showing 1 changed file with 29 additions and 7 deletions.
36 changes: 29 additions & 7 deletions docs/design-survey-conditional-logic.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,42 @@ In single- and multiple-selection question types (Dropdown, Checkbox, Radiogroup

Certain question types can contain multiple values. Use a dot symbol to access a specific value (item or cell):

| Question Type | Syntax |
| ------------------------------------------------------------------------ | ----------------------------------- |
| [Multiple Text](/Documentation/Library?id=questionmultipletextmodel) | `{questionname.itemname}` |
| [Matrix](/Documentation/Library?id=questionmatrixmodel) | `{questionname.rowname}` |
| [Matrix Dropdown](/Documentation/Library?id=questionmatrixdropdownmodel) | `{questionname.rowname.columnname}` |
<div class="v2-class---doc-table-container">
<table class="v2-class---doc-table-container__table">
<thead>
<tr>
<th>Question Type</th>
<th>Syntax</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="/Documentation/Library?id=questionmultipletextmodel" class="v2-class---paragraph-link">Multiple Textboxes</a></td>
<td><code>{questionname.itemname}</code></td>
</tr>
<tr>
<td><a href="/Documentation/Library?id=questionmatrixmodel" class="v2-class---paragraph-link">Single-Select Matrix</a></td>
<td><code>{questionname.rowname}</code></td>
</tr>
<tr>
<td rowspan="2" style="vertical-align:middle"><a href="/Documentation/Library?id=questionmatrixdropdownmodel" class="v2-class---paragraph-link">Multi-Select Matrix</a></td>
<td><code>{questionname.rowname.columnname}</code></td>
</tr>
<tr>
<td><code>{questionname-total.columnname}</code> (accesses a cell in the total row)</td>
</tr>
</tbody>
</table>
</div>

[View Demo](/Examples/Library?id=condition-complexquestions (linkStyle))

In dynamic questions, use a zero-based index to access a specific value (question or cell):

| Question Type | Syntax |
| ---------------------------------------------------------------------- | ------------------------------------------ |
| [Panel Dynamic](/Documentation/Library?id=questionpaneldynamicmodel) | `{dynamicpanelname[index].questionname}` |
| [Matrix Dynamic](/Documentation/Library?id=questionmatrixdynamicmodel) | `{dynamicmatrixname[rowindex].columnname}` |
| [Dynamic Panel](/Documentation/Library?id=questionpaneldynamicmodel) | `{dynamicpanelname[index].questionname}` |
| [Dynamic Matrix](/Documentation/Library?id=questionmatrixdynamicmodel) | `{dynamicmatrixname[rowindex].columnname}` |

In addition, Matrix questions support a `row` prefix that allows you to access cells on the same row: `{row.columnname}`. Similarly, you can use a `panel` prefix to access questions in the same Panel: `{panel.questionName}`.

Expand Down

0 comments on commit 0d9caa1

Please sign in to comment.