Difference between revisions of "Choice menu user input"
(11 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
[[Category: Analytica User Guide]] | [[Category: Analytica User Guide]] | ||
[[Category: Menus]] | [[Category: Menus]] | ||
− | <breadcrumbs>Analytica User Guide > | + | <breadcrumbs>Analytica User Guide > User Interfaces for End Users > {{PAGENAME}}</breadcrumbs> |
+ | {{ReleaseBar}} | ||
− | + | For the classes of nodes that can be used for parametric analysis, such as decision and variable, the [[The Expression popup menu|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. | |
− | For the classes of nodes that can be used for parametric analysis, such as decision and variable, the [[The Expression popup menu|expr menu]] includes the | ||
'''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: | '''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]]. | # Show the definition of the variable as a list, either in the ''Attribute ''view or the [[Object window]]. | ||
− | # Click the | + | # 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. <br /> {{Release||4.6|[[Image:Chapter9 7.png]]}}{{Release|5.0||[[Image:List to Choice.png]]}} |
− | # The | + | # The [[Object Finder dialog]] displays with parameter <code>I = Self</code> and <code>n = 1</code>. Click '''OK'''. |
+ | #:At this step you can also change the selection to [[MultiChoice]] before pressing '''OK''' if you want to allow the user to select any subset of the option. | ||
− | 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 [[Subscript and slice of a subarray|Choice | + | 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 [[Subscript and slice of a subarray|Choice function]] |
− | <tip title="Tip">To define ''Var1 ''as a popup menu of another variable ''Var2'', that is defined as a list, select '''Choice''' from the | + | {{Release|5.0||<tip title="Tip">To enable the selection of multiple items, where your user can select any subset of items, select [[MultiChoice]] during Step 3. |
+ | </tip>}} | ||
+ | <tip title="Tip">To define ''Var1 ''as a popup menu of another variable ''Var2'', that is defined as a list, select '''Choice''' from the [[expr]] menu, and set the first parameter to <code>I = Var2</code> in the [[Object Finder dialog]]).</tip> | ||
<tip title="Tip">To hide the '''All '''option on the popup, enter <code>inclAll = False</code> as the third parameter in the [[Object Finder dialog]].</tip> | <tip title="Tip">To hide the '''All '''option on the popup, enter <code>inclAll = False</code> as the third parameter in the [[Object Finder dialog]].</tip> | ||
Line 30: | Line 33: | ||
==See Also== | ==See Also== | ||
* [[Choice]] | * [[Choice]] | ||
+ | * [[MultiChoice]] | ||
+ | * [[Slider]] | ||
* [[Choice menus and Checkboxes in an edit table]] | * [[Choice menus and Checkboxes in an edit table]] | ||
* [[Parametric Analysis]] | * [[Parametric Analysis]] |
Latest revision as of 17:28, 1 February 2023
Release: |
4.6 • 5.0 • 5.1 • 5.2 • 5.3 • 5.4 • 6.0 • 6.1 • 6.2 • 6.3 • 6.4 • 6.5 |
---|
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 = Self
andn = 1
. Click OK.- At this step you can also change the selection to MultiChoice before pressing OK if you want to allow the user to select any subset of the option.
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 = Var2
in the Object Finder dialog).inclAll = False
as 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.
See Also
- Choice
- MultiChoice
- Slider
- Choice menus and Checkboxes in an edit table
- Parametric Analysis
- Using Parametric Analysis: Airline NLP Module 2
Enable comment auto-refresher