BookmarkSubscribeRSS Feed
Choose Language Hide Translation Bar
nikles

Community Trekker

Joined:

Mar 4, 2013

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

Joined:

Jun 23, 2011

Solution

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
2 REPLIES 2
Jeff_Perkinson

Community Manager

Joined:

Jun 23, 2011

Solution

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

Community Trekker

Joined:

Mar 4, 2013

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

That's great!  thanks.