cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar

what does 'current data table (dt)' do, why doesn't it work

This is a really basic question.

I have two data sets open in JMP, one called CONTROL and one called RELEASE.  In the script, CONTROL has just been created so it is the current data set.  I want to switch the current data set to RELEASE. 

I use the following command: 

Current Data Table (RELEASE);

This piece of code is straight out of the JMP scripting guide.  However, it doesn't work.  when I subsequently run the command:

Col Number(sample_type);

where 'sample_type' is variable in both data sets, it keeps returning the number of rows from CONTROL not the number of rows in RELEASE.  In other words, JMP still things the current data table is CONTROL.  It assumes that the  'Col Number()' function is operating on CONTROL, not RELEASE.  How do I get JMP to recognize RELEASE as the current or default data set?

Current Data Table (RELEASE);

1 ACCEPTED SOLUTION

Accepted Solutions
David_Burnham
Super User (Alumni)

Re: what does 'current data table (dt)' do, why doesn't it work

The Current Data Table function expects to receive a table reference

e.g.

 

 

dtR = Open ( "Release.jmp" );
dtC = Open( "Control.jmp" );
Current Data Table( dtR );

 

You can not write:

 

Current Data Table( Release )

 

unless 'Release' is a variable that contains a table reference.

 

If you dont have a table reference then you can create one using the Data Table function

 

dtR = Data Table("Release");

or you can write

 

Current Data Table( Data Table( "Release" ) )

where "Release" is the name of the table that you wish to make the current data table

 

Regards

 

Dave

-Dave

View solution in original post

2 REPLIES 2
David_Burnham
Super User (Alumni)

Re: what does 'current data table (dt)' do, why doesn't it work

The Current Data Table function expects to receive a table reference

e.g.

 

 

dtR = Open ( "Release.jmp" );
dtC = Open( "Control.jmp" );
Current Data Table( dtR );

 

You can not write:

 

Current Data Table( Release )

 

unless 'Release' is a variable that contains a table reference.

 

If you dont have a table reference then you can create one using the Data Table function

 

dtR = Data Table("Release");

or you can write

 

Current Data Table( Data Table( "Release" ) )

where "Release" is the name of the table that you wish to make the current data table

 

Regards

 

Dave

-Dave
r30363
Level I

Re: what does 'current data table (dt)' do, why doesn't it work

Thanks a lot, problem fixed.