Choose Language Hide Translation Bar
Highlighted
vsr
vsr
Level I

Delete formula status without deleting values

Hello,

I have a for loop for calling formulas from a file.

The loop works fine but when I try removing the formula and maintaining the created values using

<<delete formula

or

<<delete property(formula);

 

the formula is removed but the values are all gone as well.

This happens for both JMP 11 and 14.

can you please help?

 

loop:

 

formula_table = Open( formula table adress, Worksheets( "Formulas" ), Invisible );
//open data table

 For( i = 1, i <= N Rows( formula_table ), i += 1,

 col = data << New Column( formula_table:Column Name[i]/*, Eval( formula_table:Type[i] )*/ );
  If(
   formula_table:Type[i] == "Character", col << Data Type( Character ),
   formula_table:Type[i] == "Numeric", col << Data Type( Numeric )
  );
  a = Concat( formula_table:Formula[i] );
  a = Parse( a );
  col << Formula( a ); // sets formula
  col << delete formula;//doesn't work as described above
 );
 Close( formula_table, NoSave );

Thanks


 

 

 

1 REPLY 1
Highlighted
txnelson
Super User

Re: Delete formula status without deleting values

Here is a simple example showing that the

      col << delete property(formula);

works.  

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );

col = dt << New Column( "zippy", formula( Row() ) );

col << delete property( formula );
Jim
Article Labels

    There are no labels assigned to this post.