cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP Security Notice: CVE-2026-109618 and CVE-2026-109619

    JMP promptly initiated a review of its products, services, and relevant infrastructure for exposure to CVE-2026-109618 and CVE-2026-109619.

    Our assessment of JMP products has not identified exposure to these vulnerabilities. Where remediation was required within supporting environments, appropriate security updates and controls have been applied and validated.

    We have identified no evidence of successful exploitation or unauthorized access to JMP systems or customer information associated with these vulnerabilities.

    JMP continues to monitor the issue and relevant vendor guidance. No action is required by JMP customers at this time.

  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
mwechtal
Level III

Restricting Col List Box entries

I have a problem with Col List Box. I'd like to restrict the list of columns available to be selected.

I've already restricted it to Numeric and Continuous, but in my application that leaves a very long list.

For that matter, if there is another way that's easier (Column Dialog?), that would be fine too. The documentation seems limited on this. For instance, it shows that a script can be added to the Col List Box() function, but does not have an example, or describe how that would be done.

 

Using a modified example from the Scripting Index, how would I, for example, remove all column names that start with an N?

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );
New Window( "Col List Box Example 3",
	H List Box(
		ll1 = Col List Box( all,
			<< Set Data Type( "Numeric" ),
			<< Set Analysis Type( "Continuous" )),
		Button Box( "Add", ll2 << append( ll1 << get selected ) ),
		ll2 = Col List Box( "numeric", MaxItems( 1 ), nlines( 1 ) ),
		Button Box( "Remove", ll2 << remove selected )
	)
);
2 ACCEPTED SOLUTIONS

Accepted Solutions
uday_guntupalli
Level VIII

Re: Restricting Col List Box entries

@mwechtal, 

   How about something like this ? 

 

dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );

ColumnNames = dt << Get Column Names("String"); 

for(i = N Items(ColumnNames), i >= 1 , i--,
		If(!IsMissing(Regex(Char(ColumnNames[i]),"PNP*")),
			Remove From(ColumnNames,i); 
		  );
   );
ColumnNames; 

New Window( "Example", b = Button Box( "Popup Menu", Print( b << Get Menu Choice ) ) );
b << set menu items(ColumnNames);
Best
Uday

View solution in original post

vince_faller
Super User (Alumni)

Re: Restricting Col List Box entries

Check out filter col selector(). 

 

Names default to here(1);
dt = open("$SAMPLE_DATA\Big Class.jmp");
new window("Test", 
	fcs = filter col selector(dt)
);

It gives you a lot of options for reduction.  

Vince Faller - Predictum

View solution in original post

4 REPLIES 4
uday_guntupalli
Level VIII

Re: Restricting Col List Box entries

@mwechtal, 

   How about something like this ? 

 

dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );

ColumnNames = dt << Get Column Names("String"); 

for(i = N Items(ColumnNames), i >= 1 , i--,
		If(!IsMissing(Regex(Char(ColumnNames[i]),"PNP*")),
			Remove From(ColumnNames,i); 
		  );
   );
ColumnNames; 

New Window( "Example", b = Button Box( "Popup Menu", Print( b << Get Menu Choice ) ) );
b << set menu items(ColumnNames);
Best
Uday
mwechtal
Level III

Re: Restricting Col List Box entries

That wasn't exactly what I was thinking of, but it works!
vince_faller
Super User (Alumni)

Re: Restricting Col List Box entries

Check out filter col selector(). 

 

Names default to here(1);
dt = open("$SAMPLE_DATA\Big Class.jmp");
new window("Test", 
	fcs = filter col selector(dt)
);

It gives you a lot of options for reduction.  

Vince Faller - Predictum
mwechtal
Level III

Re: Restricting Col List Box entries

This will also work. I knew about filtering, but hadn't thought about scripting it.

Recommended Articles