Our World Statistics Day conversations have been a great reminder of how much statistics can inform our lives. Do you have an example of how statistics has made a difference in your life? Share your story with the Community!
Choose Language Hide Translation Bar
Highlighted
joelahn
Level I

Deleting Column Formula error by using Delete Property (formula) script.

Hi,

 

I have multiple columns with formula, and I wanted to remove formula after calculations.

codes are as below.

 

cols = dt << get column names();

For( i = 1, i <= N Col( dt ), i++,
    cols[i] << Delete Property( formula )
);

 

Then, the log says the following:

Send Expects Scriptable Object in access or evaluation of 'Send' , cols[i] <<  /*###*/Delete Property( formula ) /*###*/

Can somebody help on me this?

 

Another question is if we can make a list of specific columns and delete formula.

We have a script called "Delete Formula", I wanted to use this to column list, but it seems it's not working well.

2 REPLIES 2
Highlighted
joelahn
Level I

Re: Deleting Column Formula error by using Delete Property (formula) script.

cols = dt << get column names();

For( i = 1, i <= N Col( dt ), i++,
    As Columns( cols[i] ) << Delete Property( formula )
);


Putting As Column() has resolved this. Yet I still have wonders why it did work a few times, then later on it didn't work - with same JMP versions (I use both 15, and 16EA).

Highlighted
txnelson
Super User

Re: Deleting Column Formula error by using Delete Property (formula) script.

cols = dt << get column names();

For( i = 1, i <= N Col( dt ), i++,
 column(cols[i]) << Delete formula;
);

//or

For( i = 1, i <= N Col( dt ), i++,
 column(i) << Delete formula;
);
Jim