Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
yanee
Level III

Subset table from the list of parameter

Hi,

 

I try to subset my raw data with the parameters list identified in the different file ... below is the script.

 

 

Names Default To Here( 1 );

// Select the data table and open it
path = Pick File( "Select Data Table" );
dt_raw = Open( path );

// Select the limits table and open it
path = Pick File( "Select Limits Table" );
dt_spec = Open( path );

dt_raw << set name( "raw" );
dt_spec << set name( "spec" );

Current Data Table( dt_spec );
ColList = Column( "Parameter" ) << GetAsMatrix();

Insert Into( ColList, "SERIAL_NO", 1 );
Insert Into( ColList, "~STAGE", 2 );
Insert Into( ColList, "EQUIP_ID", 3 );
Insert Into( ColList, "SOFTWARE_ID", 4 );
Insert Into( ColList, "FW_PACKAGE", 5 );
Insert Into( ColList, "FW_ADUCM", 6 );

Data Table( "raw" ) << Subset( output table( "raw_data" ), all rows, columns( Eval( ColList ) ) );

 

 

I got the "Column not found in access or evaluation of 'Bad Argument'  error message. I know that it has something to do with the columns (eval(ColList)) but not sure what's wrong.

 

 

1 REPLY 1
Highlighted
txnelson
Super User

Re: Subset table from the list of parameter

What does "ColList" contain.  Have you displayed it in the JMP Log?  Your subset code should be working.  I would suggest a simple change.  The line

ColList = Column( "Parameter" ) << GetAsMatrix();

should more precisely be written as

ColList = Column( dt_spec, "Parameter" ) << Get Values;
Jim
Article Labels

    There are no labels assigned to this post.