BookmarkSubscribeRSS Feed
Choose Language Hide Translation Bar
Highlighted
Shunee
Occasional Contributor

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]);
      );
);
0 Kudos
1 ACCEPTED SOLUTION

Accepted Solutions

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.

1 REPLY 1

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.