cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Instantly extract effect sizes, F-ratios, and FDR-adjusted p-values from your models with the Calculate Effects Sizes extension, available now in the JMP Marketplace!
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
yc4037
Level I

JSL: make check box in loop


Hello guys,

I'm learning JSL recent days , but come across many problems , one of them is like this:

see I have 3 names stored in a table, I want to put these names into a window with check box infront of each name:

2117_Capture1.PNG

I can make it by the script below:

/* script 1 */

x1="Name1";

x2="Name2";

x3="Name3";

New Window("Hi",

y1=Check Box(eval(x1)),

y2=Check Box(eval(x2)),

y3=Check Box(eval(x3))

);

how can I do it in loop, since it may have thousands of names in future.

thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
yc4037
Level I

Re: JSL: make check box in loop

, problem soved,


First, get list of all names: list=column_name[1:N Rows];  then make them into check box: new window("hello", var=check box(list));

done :-).

View solution in original post

2 REPLIES 2
yc4037
Level I

Re: JSL: make check box in loop

, problem soved,


First, get list of all names: list=column_name[1:N Rows];  then make them into check box: new window("hello", var=check box(list));

done :-).

Re: JSL: make check box in loop

If there could be thousands of them, you'd probably be better putting them into a single list box - something like this:

lblist = {"AAA", "BBB", "CCC", "DDD", "EEE"};

lb = list box(lblist, nlines(min(nItems(lblist), 30)));

WriteToLog = expr(show(lb << get selected));

okbox = buttonbox("Do Something", WriteToLog);

nw = new window("Control", lineupbox(ncol(1), lb, okbox));

Recommended Articles