Hello,
Currently I have code that populates a data table with a new column containing a formula. This column is then used as overlay in graph builder.
I was wondering if there is a way to delete this column (with the formula) once the user exits out of the graph builder. Thank you for the help!
Names Default To Here (1);
dt = Current Data Table();
// first program
program1 = function({},
show("formula 1");
// JSL code
dt << New Column("Bin", Character, formula(If( /*formula code*/)));
);
// second program
program2 = function({},
show("formula 2");
// JSL code
dt << New Column("Bin", Character, formula(If( /*formula code*/)));
);
// third program
program3 = function({},
show("formula 3");
// JSL code
dt << New Column("Bin", Character, formula(If( /*formula code*/)));
);
// fourth program
program4 = function({},
show("formula 4");
// JSL code
dt << New Column("Bin", Character, formula(If( /*formula code*/)));
);
//window that allows users to press button to generate graph with state ID labels based on protocol type
nw = new window("Program Options", << modal,
panel box("Click the button to run the desired program",
lineup box(ncol(1),
SpacerBox(),
b1 = button box("program 1",
program1();
okBtn << Click();
),
b2 = button box("program 2",
program2();
okBtn << Click();
),
b3 = button box("program 3",
program3();
okBtn << Click();
),
b4 = button box("program 4",
program4();
okBtn << Click();
),
),
),
h list box(SpacerBox(),okbtn = Button Box("Cancel"), SpacerBox())
);
//make graph
gb = dt << Graph Builder (
//time, volume, bin are column names
Variables( X( :Time ), Y( :Volume ), Overlay( :Bin )),
Elements
(
Points
(
X, Y, Legend( 9 )
)
),
Categorical Color Theme("JMP Vibrant");
);
reportWindow = gb << Report;