通过获取用户输入创建列//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<你好, 我是 JMP 新用户。我想用用户输入的值创建一个列。但是,我在获取该值时遇到了麻烦。有3个担忧:如何获取用户输入并通过它创建新列?该脚本无法运行或返回任何数据。我尝试将“创建新列”放在“新窗口”命令之外。它会立即创建新列,而无需携带任何用户输入。我该如何解决? (因为我认为 JSL 会逐行执行脚本。谢谢。 自动化和脚本编写视窗回复:通过获取用户输入创建列如果您只需将“,”更改为“;”就足够了在你的过滤器 = fb << get text(); 之后线
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))
)
);
如果您想阻止 JMP 在窗口打开时继续执行脚本,您可以使用模式窗口。 构建模态窗口 (jmp.com)