Subscribe Bookmark RSS Feed

How to parse this statement?

djhanson

Community Trekker

Joined:

Jun 23, 2011

Hi, anyone know how to parse this statement so it will work? I am trying to place two variables within the X variable portion of a Variability Chart statement using an if statement:

chartVar = Variability Chart(
Y(:YVAR),
X(:XVAR1,if(plotFruit=="Yes",
parse(eval( ":" || XFRUIT));parse(",");parse(eval( ":" || XTIME)),
plotFruit=="No",parse(eval( ":" || XTIME))),

,where plotFruit is a variable to determine if XFRUIT column should display in the variability chart's x-axis.

If plotFruit=="Yes" then I want X(:XVAR1,:XFRUIT,:XTIME)
else if plotFruit=="No" then I want X(:XVAR1,:XTIME).

Parsing each individually works, but I can't get the comma in between XFRUIT and XTIME parse statements to work properly. I've tried parsing, eval, char the comma to no avail as it needs to simply separate the 2 columns. Any ideas?

thanks!! ..dj

Message was edited by: djhanson

Message was edited by: djhanson
2 REPLIES
ms

Super User

Joined:

Jun 23, 2011

Maybe Parse() is not needed. Try this!
djhanson

Community Trekker

Joined:

Jun 23, 2011

woo-hoo! that does the trick. Thanks MS!!!!