cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
lilysecret
Level III

Delete "List Check" and "Range Check" properties from entire data table

Hello,

I need to loop through all the columns in xml import data tables and remove the "List Check" and "Range Check" properties throughout. I've tried several different iteration of doing this and nothing is working for me. Here is an example of non-working code:

 

dt = current data table();

//********************\\
colNames = dt << get column names( string, character );

For( i = 1, i <= N Items( colNames ), i++,
	Column(dt, i) << Delete Property("Range Check");
	Column(dt, i) << Delete Property("List Check");
	);

This produces the following error message. Any help resolving this would be appreciated. Sample data provided. Thanks!

 

2023-08-18 11_51_46-JMP Alert.png

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Delete "List Check" and "Range Check" properties from entire data table

Try this

Names Default To Here( 1 );
dt = current data table();
// Open Data Table: big class.jmp
// → Data Table( "big class" )
//Open( "/C:/Program Files/SAS/JMPPRO/16/Samples/Data/big class.jmp" );
colNames = dt << get column names( string );
For Each( {col, index}, colNames,
	Show( col );
	Try(
		As Column( col ) << delete property( "List Check" ) <<
		delete property( "Range Check" )
	);
);
Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: Delete "List Check" and "Range Check" properties from entire data table

Try this

Names Default To Here( 1 );
dt = current data table();
// Open Data Table: big class.jmp
// → Data Table( "big class" )
//Open( "/C:/Program Files/SAS/JMPPRO/16/Samples/Data/big class.jmp" );
colNames = dt << get column names( string );
For Each( {col, index}, colNames,
	Show( col );
	Try(
		As Column( col ) << delete property( "List Check" ) <<
		delete property( "Range Check" )
	);
);
Jim
lilysecret
Level III

Re: Delete "List Check" and "Range Check" properties from entire data table

Thanks very much, that is working!