Carrot reference
...
Fields
Data Types

Enum

An Enum represents one value out of a set of allowed values, each with a unique label.

This is the value type produced by the "Single Select", "Multiple Select", "Numeric Scale", and "Smart Bucket" field types.

Properties

Property

Type

Description

label

String

The label of the Enum value, for example Meets Expectations

color

String

The hex color code of the Enum value

num

Number

If the value comes from a Numeric Scale field, the numeric value of this value

expr

String

If the value comes from a Smart Bucket field, the Carrot formula expression of the bucket

Type Conversions

Enums that contain num values can be used in place of Number for math operations, and will be automatically converted to their numeric value.

  • For example, you can call mean(performanceRating1, performanceRating2) to average together two different "performance rating" enums.



Updated 08 Nov 2024
Doc contributor
Doc contributor
Did this page help you?