Bundt Scripting Reference · Bundt Scripting Language version 1.0.1.0

create enum item statement

Creates a new enumerated item and puts it in context.

The enumerated type owning the new enumerated item is also put in context.

Syntax

create enumitem Name
    [under Parent]
    [of Owner]

Element Type Optionality Notes
Name Expression<Identifier> or Expression<Dictionary<Identifier>> Mandatory. Specifies the name of the new enumerated item, either as an identifier or in multilingual dictionary format.
Parent Enumerated item name Optional. Specifies the parent enumerated item for the new one.
Owner Enumerated type name Optional. If no owner is specified, the enumerated type in context is used. If no enumerated type is in context, an error occurs. Specifies the enumerated type that will own the new enumerated item.

Returns

The enumerated item just created.

Examples

Intent Code
Create a new enumerated item with a simple name in the context enumerated type create enum item Blue;
Create a new enumerated item with a multilingual name in the context enumerated type create enum item [en_GB: Blue, es_ES: Azul];
Create a new enumerated item in an explicit owner create enum item Blue of Colours;
Create a new enumerated item under an explicit parent enumerated item create enum item Navy under Blue;
Create a new enumerated item under an explicit parent enumerated item of an explicit owner create enum item Navy under Blue of Colours;

See Also


Contents distributed under a Creative Commons Attribution 4.0 International License · About · Terms of Use · Contact Us · last updated on 08 October 2020