Skip to main content

Branch class

📖 Description

The Branch class represents a branch in the form definition.

🗃️ Fields


🏷️ branches

Retrieves a reference to parent Branches collection.

Type

Branches


🏷️ section

Retrieves the parent section.

Type

Section


🏷️ conditions

Retrieves the collection of conditions.

Type

Conditions


🏷️ 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"

info

When a branch doesn't contain any conditions it will only be taken when the culling mode is first or all.


🏷️ id

Retrieves the identifier of the branch.

Type

string


🏷️ index

Retrieves the zero-based index of the branch in the Branches collection.

Type

number


🏷️ isFinish

Retrieves if this branch is a finish. This means the form will end when this branch is taken.

Type

boolean


🏷️ isFirst

Retrieves if the branch is the first branch in the Branches collection.

Type

boolean


🏷️ isLast

Retrieves if the branch is the last branch in the Branches collection.

Type

boolean


🏷️ isMain

Retrieves if this is the main (root) branch of a form.

Type

boolean


🏷️ props

Retrieves the properties of the branch.

Type

IBranch


🏷️ runner

Retrieves a reference to the Runner instance.

Type

Runner