对于第一部分,这可能会让你开始
Names Default To Here(1);
dt = New Table("Untitled",
Add Rows(6),
Compress File When Saved(1),
New Column("ID",
Character,
"Nominal",
Set Values({"A001", "A002", "A003", "B001", "B002", "B003"})
)
);
nw = New Window("", << modal, << return result,
v list box(
teb = text edit box("A00*"),
h list box(
Button Box("OK"),
Button Box("Cancel"),
)
)
);
If(nw["Button"] != 1,
stop();
);
// no real idea behind the selection logic, so we will use very simple one
// user has to always provide *
user_input = nw["teb"];
If(!Contains(user_input, "*"),
Throw("No wild card provided!");
);
user_rows = dt << Get Rows Where(Starts With(:ID, Substitute(nw["teb"], "*", "")));
user_ids = dt[user_rows, "ID"];
通过让 JMP 为它创建脚本,连接很容易完成。 然后只需添加引用并可能将其变成一个函数
我有一个数据表,第一列填充有part_ID(其他列有与每个零件相对应的其他信息)和一个工作函数,该函数从数据库加载给定(单个)part_ID 的测试数据。我想通过模式窗口获得以下功能。
1. 让用户使用通配符选择数据表中的part_ID。 例如,part_ID 的形式为 A0012、A0013、A0014 等,然后是 B7001、B7002、B7003 等。 用户只需指定 A00* 或 B70* 之类的内容,然后在数据表中选择相应的part_ID,其中 * 是通配符。
2. 一旦选择了part_ID,我想循环遍历它们并通过我的函数获取测试数据(该函数将part_ID作为输入并在数据表中返回测试数据),然后连接下面的每个新数据表前面的得到最终的数据表(注意所有测试数据表都有相同的列名)
如何在 JSL 中实现这一点?