This article explains how to use Conditional Parts in your report template to show or hide sections based on whether a respondent has answered scoring questions in a given section, subsection, or segmentation.
If your assessment has optional or conditional sections, you may not want every part of the report to appear for every respondent. Conditional Parts let you wrap content in your report template, so it only appears when the respondent has score records for a specific section, subsection, or segmentation.
How Conditional Parts Work
You include a merge string to mark the start and end of the conditional part in your report template. At report generation time, Brilliant Assessments checks whether the respondent has any score records for the specified section, subsection, or segmentation. If they do, the content between the start and end merge strings is included in the output. If they don't, it is removed.
A respondent is considered to have answered a section if they have answered any scoring question within it (i.e., the maximum points is greater than 0) - even if the answer itself is worth 0 points.
You can nest conditional parts within each other. For example, you might have an outer conditional that checks whether a section was answered, and inner conditionals for each subsection within it. By definition, if at least one subsection has been answered, its parent section will be too.
Tips:
- Only whole lines are supported - you can't use conditions inside a table cell.
- Although the merge strings each use a line in your template, they will not take up any space in the output PDF or Word document.
- Make sure you consider page breaks when placing your end Conditional Part merge string.
- If you have a qualifying question with a score in a conditional section/subsection, you can use suppress scoring for the "not applicable" answer to ensure the conditional part doesn't appear.
Merge Strings
The following merge strings are available under Ratings Based Text in the Merge Manager:
| How to Define | Merge Manager Type | Merge String |
| Start of a conditional part | Conditional Part Begin | {If} |
| End of a conditional part | Conditional Part End | {EndIf} |
Parameters
Use these parameters to specify which section, subsection, or segmentation the conditional part should be based on:
| Show For | Merge Manager Steps | Parameter | Notes |
| One section | "Show" → Sections "Section" → choose section name |
SectionNo=n |
If the Subsection parameter is not used, there will be one result. n = the section number. |
| One subsection | "Show" → Subsections "Section" → choose section name "Subsection" → choose subsection |
SubSectionNo=n |
The Section parameter must also be used. n = the subsection number. |
| One segmentation | "Show" → Segmentations "Segmentation" → choose segmentation |
SegmentationNo=n |
Cannot be combined with Sections or Subsections. n = the segmentation number (available in the Segmentations function). |
Example
To show a block of content only when the respondent has answered scoring questions in Section 2, wrap the content like this:
{If[SectionNo=2]}
Your text and merge strings for Section 2 go here.
{EndIf[SectionNo=2]}
Everything between the {If} and {EndIf} merge strings will only appear in the generated report if the respondent has at least one score record in Section 2.
Comments
0 comments
Please sign in to leave a comment.