Subscribe Bookmark RSS Feed

Tricky Graph Builder ( Y( {list of columns})) question

agonzales2021

Contributor

Joined:

Jun 23, 2017

I have found using a sample data set that I can achieve performing an eval of a list for the Y axes to input into graph builder.

The problem is, it seems to only work when I attempt the code with a sample and not with my actual data table.

 

dt = Current data table();

//(columns in dt as an example named DATE, WW, MODULE, BEOL_1, BEOL_2, BEOL_3, FEOL_X )

 

colus= dt << Get column Names();

B_list = {};

For(i=1,i<=N Items(colus),i++,

If(left(colus[i],4)=="BEOL", insert into(B_list, colus[i]))

); 

 

str="";
for(i=1,i<=N Items(B_list),i++,
colName = B_list[i];
yStr = EVALINSERT("Y(^colName^, Position(1)),");
str = str||yStr;
);

 

But it keeps failing at yStr with an error like:
Name Unresolved: BEOL_1in access or evaluation of 'BEOL_1' , BEOL_1/*###*/

 

I just don't get it.

My plan was eventually use eval(parse(evalinsert(graph builder()))

2 REPLIES
David_Burnham

Super User

Joined:

Jul 13, 2011

Just a thought: try:

colus= dt << Get column Names(String);

String is a keyword that will make colus contain a list of string names rather than column references.

 

-Dave
David_Burnham

Super User

Joined:

Jul 13, 2011

Having looked at this again I think my suggestion of using the String keyword should fix the problem.

The original example that you had used a list that contained a list of strings that represented the column names.

But once you fix this problem you will hit one other problem; the example that you are basing your code on has a colon before ^colName^ and that is missing from your code:

yStr = EvalInsert( “Y(:^colName^,Position(1)),”);

 

-Dave