cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
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.