I have a somewhat strange need, though I think it might actually be possible to achieve even without JSL. What I want is to transform certain columns based on a column property, specifically text. "If column has the following text: XYZ, then carry out this formula, else do nothing." I know how to do "if/then" formulas but is there a scripting syntax to only modify columns with certain properties? I have many columns, or else I'd simply do it manually!
Here is the general structure of what you need to do....
names default to here(1);
dt=current data table();
colNames = dt << get column names(string);
for each({Name}, colNames,
if(contains(Name,"nox"),
for each row(
column(name)[row()] = ???????????; // your formula here
)
);
);
Could you please clarify your statement
"If column has the following text: XYZ, then carry out this formula, else do nothing."
Are you looking for XYZ being found in the column name, or in the any of the data values found in the column?
Here is the general structure of what you need to do....
names default to here(1);
dt=current data table();
colNames = dt << get column names(string);
for each({Name}, colNames,
if(contains(Name,"nox"),
for each row(
column(name)[row()] = ???????????; // your formula here
)
);
);
Perfect! Thanks so much. I knew this functionality must exist!