cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
DaveLee
Level IV

Column Dialog Box Question

I'm hoping there's a simple answer to this question that been evading me...  I frequently use the Column Dialog Box that allows a user to specify specific columns for user in subsequent analyses.  Is there a way to have a default list of columns automatically appear as selected.  For example, I'm using the Diamonds dataset and would like to run the script and have 'Color' and 'Clarity' automatically show up as selected.  The users could then add to and/or delete from this default list to customize analyses. 

11031_pastedImage_0.png

PS: Please ignore the dialog at the bottom o f the window  - it's just nonsense carryover that I need to clean up. 

1 ACCEPTED SOLUTION

Accepted Solutions
ian_jmp
Level X

Re: Column Dialog Box Question

Something like this, perhaps (I didn't bother to put buttons in the UI)?

NamesDefaultToHere(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

nw = NewWindow("Dialog",

HListBox(

source = ColListBox(dt, all),

destination = ColListBox()

)

);

Wait(2);

destination << setItems({:height, :weight});

View solution in original post

3 REPLIES 3
ian_jmp
Level X

Re: Column Dialog Box Question

Something like this, perhaps (I didn't bother to put buttons in the UI)?

NamesDefaultToHere(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

nw = NewWindow("Dialog",

HListBox(

source = ColListBox(dt, all),

destination = ColListBox()

)

);

Wait(2);

destination << setItems({:height, :weight});

txnelson
Super User

Re: Column Dialog Box Question

I use the following code to select in the Col List Box, all of the columns that are currently selected in the data table.  It might prove useful

colListData = Col List Box( nLines( 15 ) ),

colListData << append( dt << get column names ),  

 

// At startup, sselect the columns in the selection box for

// the columns that are selected in the data table

For( II = 1, II <= N Items( All Columns list ), II++,

   If( Column( ii ) << get selected == 1,

   colListData << set selected( II ));

);

Jim
DaveLee
Level IV

Re: Column Dialog Box Question

Thanks txnelson​ and Ian@JMP​ for your help.  I have enough to finish the problem now.