Setting Discrete Values for Variables

The property DiscreteValues on the variable allows you to get and set the input and output variable values of a field: