Skip to main content

 

Cisco Meraki Documentation

Option List Enum Mapping Guide

Option List is an Enum data type. It limits a variable to a predefined set of allowed values. A mapping supplies a value to an Option List; it does not replace the receiving variable’s allowed choices.

The source supplies the value. The destination receives it. This guide covers workflow input mappings and assignments with Set Variables.

You need permission to edit the workflows and access the variables you use. These instructions apply when Option List is available in your organization. Use Option List (new) for new enum variables; the separate legacy Enum type is deprecated.

Mapping rules

Option List to Option List

The source and destination must have exactly the same complete set of allowed values, the same Value Type (String or Integer), and the same single or multiple selection mode. Compare option values, not just labels or currently selected defaults.

Source → Destination

Result

Why

A, B, C → A, B, C

Supported when type and selection mode also match.

The complete allowed-value sets are equal.

A, B, C → A, B, C, D, E

Not supported.

The source is missing destination values D and E.

A, B, C, D, E → A, B, C

Not supported, even if the source currently selects B.

The source permits extra values D and E.

A, B, C → C, A, B, with different labels

Supported when type and selection mode match.

Labels and option order may differ; the underlying value set is unchanged.

Subset, superset, overlapping-only, and disjoint Option Lists are not compatible. String values are case-sensitive: normal and Normal are different. A String option containing "2" is different from an Integer option containing 2.

Mapping does not automatically narrow either list, convert its type, or match choices by their displayed labels. Different valid defaults do not by themselves make otherwise matching Option Lists incompatible.

Ordinary String and Integer sources

Parent-to-Child input mappings, Set Variable, and Set Variables let you use a regular String or Integer variable as the source for an Option List. These variables supply one value.

For Input, Local, Static, Global, and Environment sources, the value/default must already be saved. Eligible outputs that become available only during execution are explained below.

Source

Destination Option List

Supported?

Explanation

String with saved value "B"

String; allowed values A, B, C

Yes

The source type matches, and B is an allowed destination value.

String with saved value "D"

String; allowed values A, B, C

No

D is not allowed. Change the saved source value or choose another destination.

Integer with saved value 2

Integer; allowed values 0, 1, 2

Yes

The source is an Integer, and 2 is an allowed destination value.

String with saved value "2"

Integer; allowed values 0, 1, 2

No

Numeric-looking text is still a String. The source type must match the destination’s Value Type.

No saved value, null, or an empty String

A matching Option List

No

Save an allowed value/default first. Entering a value later in Run does not make this stored source selectable now.

String with saved value "B"

String; multiple selection; allowed values A, B, C

Yes

The one value becomes a one-item selection: ["B"]. The same rule applies to a matching Integer source.

Integer with saved value 0

Integer; allowed values include 0

Yes

Zero is a valid value, not a missing value.

An ordinary array variable containing ["B"]

String; multiple selection; allowed values A, B, C

No

A whole ordinary array reference is not supported. It differs from mapping one String value into a one-item selection.

Note: These rules apply to regular String and Integer variables. When both variables are Option Lists, their complete allowed-value sets, Value Type, and selection mode must match. Other fields may accept only Option List sources; check which sources their picker enables.

Literal values and variable references

Choice

How to configure it

Value supplied

Literal

Select a choice directly in the destination field. For multiple selection, choose the allowed items you need.

Those specific allowed values.

Reference

Open the variable-reference icon, choose an eligible source in Browse Variables, and select Save.

The selected source’s value when the step executes.

Every literal must be an allowed destination value. Multiple literal selections must not contain duplicates. Selecting several literals is different from referencing an ordinary array variable.

Insert a complete reference using the picker. Do not concatenate text onto an Option List reference or index a native multi-select Option List to turn it into a single value. Keep selected defaults in the variable definition; put references in the activity or Child input mapping field.

Allowed and disabled sources

These rules apply when the destination is an Option List. A source must also be accessible and available at the point where you use it.

Source

Can it supply the destination?

Matching Option List: same String/Integer type, selection mode, and complete allowed-value set

Yes, when its configuration and any selected value are valid.

Option List with extra/missing options, wrong Value Type, or wrong selection mode

No. A currently matching selected value does not repair the definition mismatch.

Ordinary String/Integer scalar with matching type and an allowed saved value

Yes, in the supported input/assignment fields described above. A scalar may become a one-item multi-selection.

Ordinary stored source without a usable value, or with a value outside the destination choices

No. Set a suitable saved value/default or choose another source.

Eligible workflow, Child, activity, event, or rule output that is known only at execution

May be available based on its declared type and Option List definition. The resolved value must still be allowed.

Ordinary array reference, even when its current items look allowed

No. Use supported literal selections or a matching multi-select Option List.

Whole Object, Table, or table row

No. A container is not a scalar or an Option List. A browsable container does not mean it is selectable; choose only fields the picker explicitly enables.

Legacy Enum, Boolean, Decimal, Date, or another incompatible type

No. Use a current Option List or a supported ordinary String/Integer scalar.

Incomplete/invalid Option List definition, invalid selected values, or an unresolved source

No. Repair or replace the source before using the mapping.

Runtime-only outputs may have no stored value before the preceding step executes. That does not waive type, option-set, or selection-mode requirements. The runtime-output allowance does not make an empty stored ordinary String/Integer source in Input, Local, Static, Global, or Environment scope selectable.

Where to find a source

Source location

Browse Variables location

Parent workflow variables

Workflow > Input, Local, Static, or an eligible Output.

Organization Global variables

Global.

Organization Environment variables

Env (Environment).

A Child step’s outputs

Activities > the Child step’s name > the output variable. Place the receiving assignment after the Child.

Other eligible activity/event/rule outputs

The corresponding source group offered for the field. Select a compatible value available when the receiving step runs.

Scope determines where to browse; it does not relax compatibility. Use Search to find eligible sources quickly. Disabled entries may be absent from Search results, so browse the actual scope to inspect a disabled source and its tooltip.

Defaults, required inputs, and validation

  • Input defaults are optional. An unmapped Child input may use its valid configured default. An optional input may remain unset when the workflow does not need a value.

  • Required receiving inputs need a usable value. Review their mapping/default and ensure the source will supply an allowed value. A visible reference token alone does not prove that a required value will exist.

  • Run Validate after mapping or changing definitions. Resolve the reported missing inputs and incompatible mappings. Validation is not a substitute for checking the executed result.

  • Supply appropriate runtime inputs. If one Parent input feeds several Option List destinations, the supplied value must satisfy every receiving destination. Do not rely on the Run form to repair a mapping or assume every possible future value has already been checked.

If Run is unavailable, review the displayed required-input, mapping, or validation message and allow metadata checks to complete. Other workflow permissions and configuration requirements can also affect Run availability.

Example: Map a Parent Input to a Child Input and Set Variables Mapping

In this demonstration, the Parent’s Request Priority supplies the value, and the Child’s Priority receives it. You configure the mapping on the Child step inside the Parent editor.

Prepare the variables

Use two editable workflows and create the following current Option Lists. Save their definitions and ensure the Child’s workflow activities are configured.

Workflow and variable

Scope

Value Type and selection mode

Allowed values and default

Parent: Request Priority

Input

String; Allow multiple values off

A, B, C; select B as its default.

Child: Priority

Input

String; Allow multiple values off

A, B, C; a default is optional. Turn on Required for workflow to run if this input must be supplied.

The display labels may be different in each workflow. Use the same underlying values A, B, C. Validate the Child after preparing it, then open the Parent.

Create and check the input mapping

  1. In the Parent’s activity library, select Workflows, find the Child, and drag it onto the canvas.

  2. Select the Child step. In its properties panel, expand Input. The fields in this section are the Child’s inputs.

  3. Find Open List Variable and open its variable-reference icon.

  4. In Browse Variables Mapping Modal, open Workflow > Input and select the Parent’s Option List Variable.

  5. Select Save in the picker. Confirm that the source reference appears in the Child’s Priority field, then leave the field so the editor can save it.

  6. Select Validate and resolve any messages. When the workflow is ready to run, start the Parent Workflow with an allowed value, such as B.

  7. Inspect the executed Child input. Its value should be B, rather than the source’s display label or a copy of the source’s option definitions.

Assign values with Set Variables

Set Variables updates existing variables. Each assignment row has a Variable to update destination and a New value source or literal. Choose the destination first so New value can show its compatible choices.

  1. Select Set Variables. Under Variables to update, add an assignment row if needed.

  2. Open the picker for Variable to update. Choose Option List Variable as the destination and select Save.

Selecting an allowed literal in New value assigns that fixed choice instead of reading another variable. Existing single-assignment Set Variable activities use the same source/destination distinction and compatibility rules.

native_enum_18.gif

Change, clear, or repair a mapping

  • Replace a reference: open the destination field’s picker, choose another enabled source, select Save, and confirm the new token.

  • Clear an input mapping: use its Clear enum mapping value control. Review whether the Child input is optional or has a usable default; restore a valid value if required.

  • Change a definition: after changing allowed values, Value Type, or single/multiple selection, review every affected mapping and validate again. Label-only changes and reordering do not change the allowed-value set.

  • Change a stored ordinary source: keep its new value within all receiving Option Lists. A saved reference may remain visible after its source becomes incompatible.

  • Remove a variable: review its references first and repair affected workflows rather than leaving unresolved tokens.

Read the disabled-source explanation

Browse to the disabled source and hover over it, or focus it with the keyboard, to read its tooltip. The picker’s Save action becomes available only when an eligible source is selected.

Explanation

Action

No value is set

Set a valid saved value/default on the ordinary stored source.

Wrong data type or single/multiple selection

Choose a source with the required type and compatible shape.

Contains option values that are not allowed / missing required option values

Align the complete Option List sets deliberately, or choose another source. Do not rely only on its selected default.

Current value is not allowed

Choose an allowed literal or correct the ordinary source’s stored value.

Option List configuration is incomplete or invalid

Repair the definition, allowed options, and selected values.

Target does not accept references to primitive variables

Use a matching Option List source for that field.

 

  • Was this article helpful?