Choice

The Choice datatype is used to represent a fixed set of choices. This is a special datatype that is only used by System Properties, such as priority, statusClassification, and trendValue.

Choices do not have any methods, and cannot be used with any operators besides the equality = operator.

Equality

Choices can be compared for equality by using the choice name, without quotation marks.

this.object.statusClassification = RED
myRisk.priority = GREEN

Caution

In Reporter, standard Choice equality is not supported (including within #ext/#endExt) and instead equality must be checked by comparing the name property of the Choice to a hardcoded String. This is done by appending .name at the end of the Choice property this.object.statusClassification.name and comparing it to the name of the Choice as a hardcoded String. This comparison is case-sensitive.

this.object.statusClassification.name = "RED"
myRisk.priority.name = "RiskType.powderGreen"
myRisk.priority.name = "RiskType.deepPurple"

Common Choice Property Names

The following tables contain the name values of the common Choice properties priority, statusClassification, and trendValue. If using the Choice name to check for equality, it must be hardcoded as a String (wrapped in quotes).

priority

_images/priorityColors.png

Choice

Choice Name (String)

DARKGREEN

RiskType.darkgreen

DEEPPURPLE

RiskType.deepPurple

DEEPRED

RiskType.deepRed

GREEN

RiskType.green

HOTPINK

RiskType.hotpink

LIGHTGREEN

RiskType.lightGreen

MIDNIGHTBLUE

RiskType.midnightBlue

ORANGE

RiskType.orange

PINK

RiskType.pink

POWDERBLUE

RiskType.powderBlue

POWDERGREEN

RiskType.powderGreen

PURPLE

RiskType.purple

RED

RiskType.red

ROYALBLUE

RiskType.royalBlue

STEELBLUE

RiskType.steelBlue

YELLOW

RiskType.yellow

statusClassification

Choice

Choice Name (String)

BLUE

BLUE

DARK

DARK

GREEN

GREEN

NONE

NONE

ORANGE

ORANGE

RED

RED

YELLOW

YELLOW

trendValue

Choice

Choice Name (String)

NEGATIVE

NEGATIVE

NEUTRAL

NEUTRAL

POSITIVE

POSITIVE

UNAVAILABLE

UNAVAILABLE

visibility

The visibility property is used to access the value of the property displayed in Configuration Studio as “Visible”. This is different from .visible which is a special property that will return True or False if an Object is visible or not. visibility on the other hand is used to get the actual property value out (Visible, Not Visible, Only Visible for Admin, Only Visible when displayed as page).

Choice

Choice Name (String)

VISIBLE

VISIBLE

NOVISIBLE

NOVISIBLE

ADMINVISIBLEONLY

ADMINVISIBLEONLY

VISIBLEASPARENTONLY

VISIBLEASPARENTONLY