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

How to update data table in script with new column created

I'm new to using jmp and I'm trying to create a script that creates a new column with formula then plots the new column to a histogram. I've got the script below. It's working but it's giving me an error that "The data table has changed. The output no longer represents the data. To sync the output with the data, select 'Script>Redo Analysis' from the Distribution menu."

So basically when the script gets to plotting the distribution, it's still looking at the old data table and not the one with the new created column. I'm not sure how update the data table or script to let it know that the table has a new column.

dt364 = Current Data Table();

New Column ("New Column",

Numeric,

Continuous,

Formula( :Name("Column1") - :Name("Column2")

)

);

 

New Window( "New Data",

rpridelta = Distribution(

Continuous Distribution(

Column( "New Column" ),

Quantiles( 0 ),

Normal Quantile Plot( 1 )

),

By( :Wafer id )

)

);

rpridelta << save picture( "C:/data/A08pridelta.jpg", jpeg );

1 ACCEPTED SOLUTION

Accepted Solutions
robot
Level VI

Re: How to update data table in script with new column created

Hi,

I think the problem is that when you create your new window for the distribution, JMP no longer recognizes dt364 as the current data table.  I changed rpridelta to reference your new window and added a specific reference to dt364 to your distribution.  This should work.

dt364 = Current Data Table();

New Column( "New Column",

      Numeric,

      Continuous,

      Formula( :Name( "Column1" ) - :Name( "Column2" ) )

);

rpridelta = New Window( "New Data", // Change new window name to rpridelta

      dt364 << Distribution( // Add referance to dt364.

            Continuous Distribution(

                  Column( "New Column" ),

                  Quantiles( 0 ),

                  Normal Quantile Plot( 1 )

            ),

            By( :Wafer id )

      )

);

rpridelta << save picture( "C:/data/A08pridelta.jpg", jpeg );

View solution in original post

1 REPLY 1
robot
Level VI

Re: How to update data table in script with new column created

Hi,

I think the problem is that when you create your new window for the distribution, JMP no longer recognizes dt364 as the current data table.  I changed rpridelta to reference your new window and added a specific reference to dt364 to your distribution.  This should work.

dt364 = Current Data Table();

New Column( "New Column",

      Numeric,

      Continuous,

      Formula( :Name( "Column1" ) - :Name( "Column2" ) )

);

rpridelta = New Window( "New Data", // Change new window name to rpridelta

      dt364 << Distribution( // Add referance to dt364.

            Continuous Distribution(

                  Column( "New Column" ),

                  Quantiles( 0 ),

                  Normal Quantile Plot( 1 )

            ),

            By( :Wafer id )

      )

);

rpridelta << save picture( "C:/data/A08pridelta.jpg", jpeg );