cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
joelahn
Level II

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.

Joel Ahn
Lam Research Corporation
Mobile +82 10 9509 0109
2 REPLIES 2
joelahn
Level II

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).

Joel Ahn
Lam Research Corporation
Mobile +82 10 9509 0109
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