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.