This version of the Help is no longer updated. See JMP.com/help for the latest version.

.
Scripting Guide > Data Tables > Basic Data Table Scripting > Set the Current Data Table
Publication date: 07/30/2020

Set the Current Data Table

Tip: Be careful about assuming that the data table that you want is the current data table, even if you set it to be earlier in your script, because interim actions could change that.

A data table becomes the current data table in the following instances:

When you open it, as follows:

dt1 = Open( "$SAMPLE_DATA/Big Class.jmp" );

When you create a new table, as follows:

dt2 = New Table( "Cities" );

To switch to another open data table, specify the name of the data table in Current Data Table():

dt1 = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt2 = New Table( "Cities" );
Current Data Table( dt1 ); // make Big Class.jmp the current data table

Current Data Table() can also take a scriptable object reference as an argument. The following expression would make the data table in use by the second Bivariate object the current data table:

Current Data Table( Bivariate[2] );

For more information about using references to analysis platform objects, see Send Messages to a Platform in the Scripting Platforms section.

Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).