Choice menu user input
• • • 5.2
For the classes of nodes that can be used for parametric analysis, such as decision and variable, the expr menu includes the Choice option. The Choice option provides a way to offer the user a choice of selecting one or all values from a list.
Creating a menu from a list: If the original variable is already defined as a list of numbers or labels, create a popup menu to select from the list as follows:
- Show the definition of the variable as a list, either in the Attribute view or the Object window.
- Click the expr menu and select the Choice option. Click OK to the question “Replace current definition with a Choice?” and click OK again to “Replace current definition?” when prompted.
- The Object Finder dialog displays with parameter
I = Selfand
n = 1. Click OK.
The definition field of the original variable now displays as a popup menu, and in browse mode, the input node displays as a popup menu. The original definition (list of numbers or labels) is now available as the domain of the variable — the possible outcomes. In the expression view, the popup menu displays as the Choice function
I = Var2in the Object Finder dialog).
inclAll = Falseas the third parameter in the Object Finder dialog.
Creating a new definition: If a variable has no previous definition, when you select Choice from the expr menu, a domain (possible outcomes) is created with a list of Explicit Values, with one element in the list.
To change the domain to List of numbers, press the Domain value type popup to the right of the Explicit Values pop-up and select Numbers.
Edit the list of values as you would edit a list of labels or list of numbers.
Note: The values in the domain are evaluated deterministically.
- Choice menus and Checkboxes in an edit table
- Parametric Analysis
- Using Parametric Analysis: Airline NLP Module 2