Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.
Created:
Feb 13, 2023 08:23 AM
| Last Modified: Jun 8, 2023 9:36 AM(3033 views)
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
)
);
);
Thanks. Should have clarified. I am referring to the text in the column name rather than the actual data in the table’s cells. So: “if column name includes xyz, then do this transformation.”
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
)
);
);