//Assign Data Table + Delete Column Flag if it already there
dt=current data table();
//Create new window to get data from user
filter="";
nw=New Window("Flag Creation",
border box(top(50),bottom(100),left(50),right(100)),
H Center Box(Text Box("Input a single Conditon Bin to Flag")),
Text Box("Condition:"),fb=Text Edit Box("bbb"),
Button box("Run",
filter = fb << get text(),
dt<Hi, I am a new JMP user. I want to create a column with the value from the user input. However, I got trouble getting the value.There are 3 concerns:How can I get the user input and create new column by it? The script cannot run or return any data.I try to put create new column outside of New Window command. It instantly create the new columns without carrying any user input into it. How can I solve it? (since I think that JSL will execute the script line by line.Thanks. Automation and ScriptingWindowsRe: Create a Column by getting a user inputIt might be enough if you just change the "," to ";" after your filter = fb << get text(); line
Names Default To Here(1);
//Assign Data Table + Delete Column Flag if it already there
dt = Current Data Table();
//Create new window to get data from user
filter = "";
nw = New Window("Flag Creation",
Border Box(top(50), bottom(100), Left(50), Right(100)),
H Center Box(Text Box("Input a single Conditon Bin to Flag")),
Text Box("Condition:"),
fb = Text Edit Box("bbb"),
Button Box("Run",
filter = fb << get text();
dt << New Column("Flag", Numeric, "Continuous", Format("Best", 12), Formula(filter))
)
);
If you want to prevent JMP from continuing script execution when window is open, you can use modal windows for that. Construct a Modal Window (jmp.com)