IChoiceFormula
Defines the public contract for the ChoiceFormula class, exposing validation, CASE_WHEN conversion, category extraction, and choice list identification for CHOICE_FORMULA custom expressions.
Operations
Valid #
Determine whether the stored expression is a valid CHOICE_FORMULA
Signature:
Public Property Get Valid() As Boolean: End Property
Validation, conversion, and metadata extraction. Implementations verify the CHOICE_FORMULA token, balanced parentheses, and that at least three arguments are present (name plus one condition/result pair). Returns False for blank arguments.
Returns: Boolean. True when the specification can be parsed.
parsedFormula #
Retrieve the CHOICE_FORMULA expression rewritten as nested IF statements
Signature:
Public Property Get parsedFormula() As String: End Property
Delegates to the CaseWhen converter to produce the nested IF output. Returns an empty string when the formula is invalid.
Returns: String. Nested IF expression.
Categories #
Enumerate the textual labels referenced by the CHOICE_FORMULA
Signature:
Public Property Get Categories() As BetterArray: End Property
Each element represents a display label shown to users for a given branch of the formula. Delegates category extraction to CaseWhen.
Returns: BetterArray. Collection containing quoted labels.
choiceName #
Retrieve the name of the referenced choice list
Signature:
Public Property Get choiceName() As String: End Property
Returns the first argument of the CHOICE_FORMULA expression, which identifies the choice list providing valid options.
Returns: String. Identifier for the choice list.