BookmarkSubscribeSubscribe to RSS Feed
swaiper

Community Trekker

Joined:

Apr 28, 2015

Delete columns in a Tabulate box

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
ms

Super User

Joined:

Jun 23, 2011

Solution

Re: Delete columns in a Tabulate box

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
ms

Super User

Joined:

Jun 23, 2011

Solution

Re: Delete columns in a Tabulate box

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^)))")));