BookmarkSubscribeSubscribe to RSS Feed

Creating a column name via a variable....then calling on the column name, as a variable, in a formula...


Community Trekker


Mar 31, 2016

I hope my subject isn't too confusing.  I'm a .jsl rookie but I have a small project I'm trying to learn on.  I am stumped on this, and not sure why it pastes in this sheet like this

I'm creating a column name via the variable dsocket which is a concatenated "d" and a row/cell from another table.  The column is created normally.

Then the formula needs to reference the very same new column name but I'm currently using the same variable (see the end of the formula).  The problem is that it appears that I'm not formatting it right when referencing the column name in the formula because instead of a :column name I am not getting the semi-colon in front.  I've tried concatenating a : to the variable but the output is ":column name" in quotes and I just need :column name.....make sense?

Any ideas how to resolve this?  I'm hoping I've overcomplicated it.  Thanks!

For(i=1, i<=1, i++,
dsocket = "d"||dtsum:Socket;
print (dsocket);
z = i + 7;
columnname = column name(z);
New Column (dsocket, Numeric, Continuous, Formula(If(:LOT[Row()] != :LOT[Row() - 1] | :OPERATION[Row()] != :OPERATION[Row() - 1] | :SUMMARY_ID[Row()] != :SUMMARY_ID[Row() - 1], If(columnname == binchoice, 1, 0), If(columnname == binchoice, Sum(dsocket[Row() - 1], 1), dsocket[Row() - 1,Empty()])))));

Community Trekker


Feb 27, 2012

I do not fully understand your problem, but one hint regarding ":column name" is...

// Instead of:

Concat( ":", column name );

// Try:

As Column( column name );