Difference between revisions of "Dropdown menus in an Edit table"

m (status)
Line 1: Line 1:
 +
[[Category:Concepts]]
 
[[Category:Ana: Status M]]  <!-- For Lumina use, do not change -->
 
[[Category:Ana: Status M]]  <!-- For Lumina use, do not change -->
  
[[What's new in Analytica 4.0?]] >
 
  
 
You can include dropdown (a.k.a. pulldown) menus in cells of an Edit table, to let end users select an option for each cell in the table. Here is an example, viewed in Browse mode:
 
You can include dropdown (a.k.a. pulldown) menus in cells of an Edit table, to let end users select an option for each cell in the table. Here is an example, viewed in Browse mode:
  
[[Image:Edit table with menus.png|center|500px]]
+
:[[Image:Edit table with menus.png|center|500px]]
  
You use the '''[[Choice]]()''' function in the Edit table cells, similar using Choice to specify a single pulldown menu for a variable. Here is how to create such a table:  
+
You use the [[Choice]]() function in the Edit table cells, similar using Choice to specify a single pulldown menu for a variable. Here is how to create such a table:  
 
   
 
   
# Create a variable X as an Edit table, in the usual way.
+
# Create a variable <code>X</code> as an Edit table, in the usual way.
# Create an Index variable -- e.g. K -- containing the list of options you want to make available from the menu(s).
+
# Create an Index variable -- e.g. <code>K</code> -- containing the list of options you want to make available from the menu(s).
# In the Edit table of X, in Edit mode, into each cell that you want to show the menu, enter: "Choice(K, 1, 0)", to use the first value of K as the initial default value.
+
# In the Edit table of <code>X</code>, in Edit mode, into each cell that you want to show the menu, enter: <code>Choice(K, 1, 0)</code>, to use the first value of <code>K</code> as the initial default value.
# Create an Input node for X: Select X, then select Make Input from the Object menu.
+
# Create an Input node for <code>X</code>: Select <code>X</code>, then select Make Input from the Object menu.
  
 
You can put a menu in one, some, or all cells. You can put different menus into different cells by using a different Index, K.
 
You can put a menu in one, some, or all cells. You can put different menus into different cells by using a different Index, K.
Line 19: Line 19:
  
 
[[Image:Edit table with menus edit mode.png|center|500px]]
 
[[Image:Edit table with menus edit mode.png|center|500px]]
 +
 +
==History==
 +
Introduced in [[What's new in Analytica 4.0?|Analytica 4.0]].
 +
 +
==See Also==
 +
* [[To make an edit table]]
 +
* [[Choice]]

Revision as of 04:54, 11 February 2016


You can include dropdown (a.k.a. pulldown) menus in cells of an Edit table, to let end users select an option for each cell in the table. Here is an example, viewed in Browse mode:

Edit table with menus.png

You use the Choice() function in the Edit table cells, similar using Choice to specify a single pulldown menu for a variable. Here is how to create such a table:

  1. Create a variable X as an Edit table, in the usual way.
  2. Create an Index variable -- e.g. K -- containing the list of options you want to make available from the menu(s).
  3. In the Edit table of X, in Edit mode, into each cell that you want to show the menu, enter: Choice(K, 1, 0), to use the first value of K as the initial default value.
  4. Create an Input node for X: Select X, then select Make Input from the Object menu.

You can put a menu in one, some, or all cells. You can put different menus into different cells by using a different Index, K.

Here is an example viewed in Edit mode, with dropdown menus in some but not all cells:

Edit table with menus edit mode.png

History

Introduced in Analytica 4.0.

See Also

Comments


You are not allowed to post comments.