Subscribe Bookmark RSS Feed

Delete columns in a Tabulate box

swaiper

Community Trekker

Joined:

Apr 28, 2015

Hi,

I'm working with a tabulate box, and I can't delete a column from script.

I have try this :

tab << modify table(column table( 1 ),delete( analysis column( Eval(columns[i]) ) ));

But doesn't work.

Incredibly, this working fine :

tab << modify table(column table(1), delete(analysis columns(:Name("NH3(ppbv)")))

How can I resolve this problem?

Thank you per advance for answers,

Sincerely,

Romain

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

The Analysis Columns() argument appears not to be evaluated at runtime and thus need to be evaluated ahead.

Two approaches that should work:

// Modify an expression before evaluation

Eval(Eval Expr(tab << modify table(column table(1), delete(analysis column(Expr(columns[i]))))));

// Modify a string before and parsing and evaluation

Eval(Parse(Eval Insert("tab << modify table(column table( 1 ),delete( analysis column(^columns^)))")));

1 REPLY
Solution

The Analysis Columns() argument appears not to be evaluated at runtime and thus need to be evaluated ahead.

Two approaches that should work:

// Modify an expression before evaluation

Eval(Eval Expr(tab << modify table(column table(1), delete(analysis column(Expr(columns[i]))))));

// Modify a string before and parsing and evaluation

Eval(Parse(Eval Insert("tab << modify table(column table( 1 ),delete( analysis column(^columns^)))")));