As List
As List using N Items
Example 1
Summary: Process of opening a table, counting unique names, and creating a new window with a list box that allows selection of items.
Code:
dt29 = Open("data_table.jmp");
nit = N Items( As List( dt29:name << get values ) );
New Window( "Test Case 29", lb29 = List Box( As List( dt29:name << get values ), var29a = lb29 << get selected ) );
lb29 << set selected( 2 );
var29b = N Items( lb29 << get items );
Code Explanation:
- Open table.
- Count unique names.
- Create new window.
- Add list box.
- Set list box items.
- Select second item.
- Get selected item.
- Count list box items.
Example 2
Summary: Process of opening a data table, counting columns, and creating a new window with a list box that displays column names and allows selection.
Code:
dt30 = Open("data_table.jmp");
nit = N Items( As List( dt30 << Get Column Names ) );
New Window( "Test Case 30", lb30 = List Box( As List( dt30 << Get Column Names ), var30a = lb30 << get selected ) );
lb30 << set selected( 4 );
var30b = N Items( lb30 << get items );
Code Explanation:
- Open data table;
- Count columns.
- Create new window.
- Add list box.
- List all column names.
- Get selected item.
- Set selection to fourth item.
- Count items in list box.