Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
Shunee
Level I

Why Set Selected Rows () can't get the argument i from For loop?

I try to select certain rows from table box when the rows meet certain criteria by using For loop. However, the Set Selected Row function seems like unable to get the i value from For loop.

report= fitModel << Report;
tb = report[TableBox(1)];
For (i=1, i <= 10, i++, 
      If(NumberColBox(1) > 0.01,
      tb << Set Selected Row ([i]);
      );
);
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Why Set Selected Rows () can't get the argument i from For loop?

A matrix of the form [...] can only contain comma-separated numeric values - it does not evaluate variables.  Try using either J(1,1,i) or Matrix({i}), which will evaluate the arguments as part of the function.

View solution in original post

1 REPLY 1
Highlighted

Re: Why Set Selected Rows () can't get the argument i from For loop?

A matrix of the form [...] can only contain comma-separated numeric values - it does not evaluate variables.  Try using either J(1,1,i) or Matrix({i}), which will evaluate the arguments as part of the function.

View solution in original post

Article Labels

    There are no labels assigned to this post.