IBranch interface
π Descriptionβ
Interface that describes a branch within the form definition.
See the form definition interface for more information about branches.
π Type declarationβ
interface IBranch { id: string;Readonly name?: string;ReadonlyOptional conditions?: ICondition[];ReadonlyOptional sections?: ISection[];ReadonlyOptional culling?: "first" | "each" | "all" | "none";ReadonlyOptional jump?: "abort" | string;ReadonlyOptional epilogue?: IEpilogue;ReadonlyOptional }
ποΈ Propertiesβ
π·οΈ sections
βΎοΈβ
Contains the sections of the branch.
Typeβ
This property is where the form definition gets its recursive behavior.
π·οΈ conditions
β
Contains the conditions of the branch.
Typeβ
π·οΈ culling
β
Specifies the culling mode of the branch. This culling mode defines when the branch is taken. It can be one of the following values:
first
: Branch is taken when one or more of the conditions match;each
: Branch is taken for each condition that matches (this allows a single branch to be taken multiple times);all
: Branch is taken when all of the conditions match;none
: Branch is taken when none of the conditions match.
Typeβ
"first" | "each" | "all" | "none"
When a branch doesn't contain any conditions, it will only be taken when the culling mode is first
or all
.
π·οΈ epilogue
β
Contains the optional epilogue for the branch. This epilogue can be used by runners (that support it) to show a closing message when the branch ends.
Typeβ
The branch epilogue is only available when the jump
is set to abort
.
π·οΈ id
β
Specifies the unique identifier of the branch.
Typeβ
string
π·οΈ jump
β
Specifies if a branch should jump to another section or abort (terminate) the whole form. When a jump to a section is desired, this property should contain the id
of the section to jump to. When the branch ends, the system jumps to the specified section and continues its operation from there. When this property is set to abort
, the form will (completes) as soon as the branch ends. It is possible to define a specific epilogue for a branch that aborts using the epilogue
property.
Typeβ
"abort" | string;
Branches can only jump forward (in time). Any jump to a section that lies before the branch (back in time) will be ignored.
π·οΈ name
β
Specifies the name of the branch.
Typeβ
string