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
saitcopuroglu
Level IV

How to choose/activate open but not saved data tables back and forth

During automated report script I create many summary tables which I don't save. Since the last created table is active and any -let's say Graph Builder- graph will be produced from the last produced active table, how do I activate/choose an inactive but open data table?

A simple example is:

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

dt2 = Open(

  "$SAMPLE_DATA/Fitness.jmp",

  Select Columns( "Name", "Sex", "Age", "Weight" )

);

Graph Builder(

  Title Fill Color( "Light Blue" ),

  Title Frame Color( "Medium Dark Gray" ),

  Level Fill Color( {174, 203, 228} ),

  Level Frame Color( "Medium Dark Gray" ),

  Level Underline( 1 ),

  Variables( X( :Sex ), Y( :Weight ) ),

  Elements(

  Bar(

  X,

  Y,

  Legend( 2 ),

  Bar Style( "Side by side" ),

  Summary Statistic( "Mean" ),

  Label( "Value" )

  )

  )

);


I would like to keep graphing but with the Big Class Data Table where the Fitness data table is active/chosen...


Thank you in advance for your help

1 ACCEPTED SOLUTION

Accepted Solutions
Craige_Hales
Super User

Re: How to choose/activate open but not saved data tables back and forth

dt1<<graph builder(...)

if you don't specify a table, the "current" table is used.  You should always specify a table since the current table changes when you click on a different table or open another table.

<< is the operator to send a message to an object.  A data table is an object, and it understands messages that look like launching platforms.

Craige

View solution in original post

2 REPLIES 2
Craige_Hales
Super User

Re: How to choose/activate open but not saved data tables back and forth

dt1<<graph builder(...)

if you don't specify a table, the "current" table is used.  You should always specify a table since the current table changes when you click on a different table or open another table.

<< is the operator to send a message to an object.  A data table is an object, and it understands messages that look like launching platforms.

Craige
pmroz
Super User

Re: How to choose/activate open but not saved data tables back and forth

You can also explicitly set the current data table using current data table(tbl_variable):

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

dt2 = Open(

     "$SAMPLE_DATA/Fitness.jmp",

     Select Columns( "Name", "Sex", "Age", "Weight" )

);

current data table(dt1);

Graph Builder(

     Title Fill Color( "Light Blue" ),

     Title Frame Color( "Medium Dark Gray" ),

     Level Fill Color( {174, 203, 228} ),

     Level Frame Color( "Medium Dark Gray" ),

     Level Underline( 1 ),

     Variables( X( :Sex ), Y( :Weight ) ),

     Elements(

           Bar(

                X,

                Y,

                Legend( 2 ),

                Bar Style( "Side by side" ),

                Summary Statistic( "Mean" ),

                Label( "Value" )

           )

     )

);