cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
nikles
Level VI

Which table does For Each Row() apply to?

When using the FOR EACH ROW() command to step through each row in a table, does JMP just assume the Current Data Table? 

 

I've made a habit of issuing a Current Data Table("target_table") command prior to using the For Each Row(), just in case.  I'm now wondering if this is necessary?

1 ACCEPTED SOLUTION

Accepted Solutions
Jeff_Perkinson
Community Manager Community Manager

Re: Which table does For Each Row() apply to?

Yes, For Each Row() assumes the current data table. As such it can be ambiguous and can rely on a Current Data Table() call just before it. 

 

A few releases ago we improved the syntax of For Each Row() and it now takes an argument in the first position to specify which data table to use. That's the best practice to ensure it's working on the data table you intend.

-Jeff

View solution in original post

2 REPLIES 2
Jeff_Perkinson
Community Manager Community Manager

Re: Which table does For Each Row() apply to?

Yes, For Each Row() assumes the current data table. As such it can be ambiguous and can rely on a Current Data Table() call just before it. 

 

A few releases ago we improved the syntax of For Each Row() and it now takes an argument in the first position to specify which data table to use. That's the best practice to ensure it's working on the data table you intend.

-Jeff
nikles
Level VI

Re: Which table does For Each Row() apply to?

That's great!  thanks.