cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
Sburel
Level IV

Enable column operations in custom UI (JSL)

Hello,

 

I've built a simple UI to simplify using the response screening platform and subsequent operation for the user.

 

In one column selection panel, I have list of all the continuous columns the user can select before moving forward. In some case, the user might want to perform an operation on the column (such as log transform) before selecting the resulting transient column.

In most platform, this option is enabled by default (right click on a column in the UI gives access to a bunch of menus/operations).

Is there a function or a way to enable that on a custom UI?

 

Thanks for tips.

 

Sebastien

1 ACCEPTED SOLUTION

Accepted Solutions
gzmorgan0
Super User (Alumni)

Re: Enable column operations in custom UI (JSL)

@Sburel,

 

I believe a FilterColSelector will work for you.

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
New Window( "Filter Col Selector Example", fontobj = lb = Filter Col Selector( width( 250 ) ) );

View solution in original post

5 REPLIES 5
txnelson
Super User

Re: Enable column operations in custom UI (JSL)

A Column Dialog() will provide you those options.  Here is the example from Column Dialog() taken from the scripting index

dialog.PNG

Names Default To Here( 1 );
Open( "$SAMPLE_DATA/Consumer Preferences.jmp" );
Column Dialog(
 ex y = ColList( "Y", Min Col( 1 ), Max Col( 2 ), Data Type( "Numeric" ) ),
 ex x = ColList( "X", Max Col( 1 ), Modeling Type( {"Continuous", "Multiple Response"} ) ),
 Line Up( 2,
  Text Box( "Alpha" ), ex = EditNumber( .05 ),
  Text Box( "Beta" ), ey = EditText( "xyz" )
 ),
 HList( cb = Check Box( "check", 1 ) ),
 HList( combo = Combo Box( "option1", "option2" ) ),
 HList( rb = RadioButtons( "a", "b" ) )
);

 

Jim
Sburel
Level IV

Re: Enable column operations in custom UI (JSL)

Thanks a lot for the tip! I'll try to implement it

Best
Sburel
Level IV

Re: Enable column operations in custom UI (JSL)

Hi Jim,

I've tried Column Dialog and it certainly offers the option to manipulate columns. However, I was hoping to implement that option in the context of 'new window'.

In order to better guide the user through their options, I've split the columns into 3 panels. I only want to offer the option to transform columns in Panel 2. i

I don't think 'column dialog' would offer me the flexibility to split the columns in multiple selection panels.

 

Any suggestion to be able to invoke the same right click menu in the context of  'new window' as for 'column dialog'. 

 

Thanks,

 

Sebastien

 

-----------------------------------------------

 

Below is a simplified version of the script I've put together

Clear Log();
Names Default To Here( 1 );
dy = Open( "$SAMPLE_DATA/Fitness.jmp" );;
ls = dy << get name();
Show( ls );

Varls = dy << get column names( continuous );
Show( Varls );


c = "Run";
col = dy << get column names( string );
Show( col );
TPMls = {};
nc = N Items( col );
For( i = 1, i <= nc, i++,
	If( Contains( col[i], c ),
		Show( col[i] );
		Insert Into( TPMls, col[i] );
	)
);
Show( TPMls );

catls = {"Name","Sex"};
nc = N Col( dy );
lbWidth = 200;
pdwidth = 400;
stop_flag = 0;
Resplg = New Window( "FIND TRANSCRIPTS OF INTEREST",
	Empty(),
	Border Box( Left( 10 ), top( 2 ), Right( 10 ),
		V List Box(
			V List Box(
				Panel Box( "Purpose of analysis platform",
					Text Box(
						"Perform ....
",
						set wrap( 800 )
					)
				),
				Panel Box( "Panel 1",
					Lineup Box( N Col( 3 ), spacing( 5 ),
						colListTPM = Col List Box(
							width( pdWidth ),
							<<append( TPMls ),
							nLines( Min( nc, 2 ) ),
							"numeric",
							<<set analysis type( "continuous" )
						),
						Button Box( "TPM",
							TPM << Append( colListTPM << GetSelected )
						),
						TPM = Col List Box(
							width( lbWidth ),
							nLines( 1 ),
							Minitems( 1 ),
							Maxitems( 1 ),
							"numeric"
						)
					)
				),
				Panel Box(
					"Panel 2",
					text box("Suggest ...", set wrap (800)),
					Lineup Box( N Col( 3 ), spacing( 5 ),
						V List Box(
							var = Col List Box(
								width( pdWidth ),
								<<append( varls ),
								nLines( Min( nc, 5 ) )
							)
						),
						Button Box( "Variable",
							Varl << Append( var << GetSelected ) 
						),
						Varl = Col List Box(
							width( lbWidth ),
							nLines( 1 ),
							Minitems( 1 ),
							Maxitems( 1 )
						)
					)
				),
				Panel Box(
					"Panel 3",
					Lineup Box( N Col( 3 ), spacing( 5 ),
						cat = Col List Box(
							width( pdWidth ),
							<<append( catls ),
							nLines( Min( nc, 5 ) ),
							"character",
							<<set analysis type( "nominal" )
						),
						Button Box( "By", catl << Append( cat << GetSelected ) ),
						catl = Col List Box(
							width( lbWidth ),
							nLines( 2 ),
							Minitems( 1 ),
							Maxitems( 2 ),
							"character"
						)
					)
				),
				Panel Box( "Action",
					Lineup Box( N Col( 3 ), spacing( 5 ),
						ex = Button Box( "Go" ),
						Button Box( "Cancel",
							Resplg << Close Window;
							stop_flag++;
						),
						Button Box( "Remove column",
							catl << RemoveSelected;
							TPM << RemoveSelected;
							varl << Remove selected;
						),
						ex << set script(show("hello"))
					)
				)
			)
		)
	))

 

gzmorgan0
Super User (Alumni)

Re: Enable column operations in custom UI (JSL)

@Sburel,

 

I believe a FilterColSelector will work for you.

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
New Window( "Filter Col Selector Example", fontobj = lb = Filter Col Selector( width( 250 ) ) );
Sburel
Level IV

Re: Enable column operations in custom UI (JSL)

Exactly what I was looking for.

 

Thanks a lot

 

Sebastien