cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • DownloadSemiconductor Toolkit: Tools to create wafer maps, add wafer geometry to graphics, explore die defects & compare wafers.
  • Discovery Summit 2026: Early User Edition - September 23-24.Register. It's free.
  • See how to design an experiment, explore factor-response relationships, assess tradeoffs, and ID best settings. Register for Sep. 11 Mastering JMP.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
switzal87
Level III

Concatenate output tables from a Loop

Hello JMP community!

 

I had these 5 tables coming from a loop. Below is the screenshot of the script (Assuming its working fine)

 

Loop.JPGLoop.JPG

How should I write a script that concatenates all the output table of the loop?!

Appreciate all inputs from this community!

 

Thanks in advance! :)

1 ACCEPTED SOLUTION

Accepted Solutions
jules
Community Manager Community Manager

Re: Concatenate output tables from a Loop

Hi @switzal87,

 

The following will concatenate the last 5 tables opened:

Data Table(N Table()) << Concatenate(
	Data Table( N Table()-1 ),
	Data Table( N Table()-2 ),
	Data Table( N Table()-3 ),
	Data Table( N Table()-4 ),
	Create source column
);

This works because Data Table(number) refers to a specific table, N Table() returns the number of data tables open in JMP, data tables are numbered based on when they are opened, thus Data Table(N Table()) returns the last table, and subtracting k from N Table() returns the table opened k tables ago. You could generalize this by writing a loop to generate the concatenation code, but if you're always pulling 5 tables this is a pretty easy way to combine them. 

 

I hope this helps!

 

@jules

 

edit: Here is a generalized version for any number of tables:

tableList={};

for(k=1,k<=4,k++,InsertInto(tableList,Data Table( N Table()-k )));

Data Table(N Table()) << Concatenate(tableList,Create source column);

View solution in original post

1 REPLY 1
jules
Community Manager Community Manager

Re: Concatenate output tables from a Loop

Hi @switzal87,

 

The following will concatenate the last 5 tables opened:

Data Table(N Table()) << Concatenate(
	Data Table( N Table()-1 ),
	Data Table( N Table()-2 ),
	Data Table( N Table()-3 ),
	Data Table( N Table()-4 ),
	Create source column
);

This works because Data Table(number) refers to a specific table, N Table() returns the number of data tables open in JMP, data tables are numbered based on when they are opened, thus Data Table(N Table()) returns the last table, and subtracting k from N Table() returns the table opened k tables ago. You could generalize this by writing a loop to generate the concatenation code, but if you're always pulling 5 tables this is a pretty easy way to combine them. 

 

I hope this helps!

 

@jules

 

edit: Here is a generalized version for any number of tables:

tableList={};

for(k=1,k<=4,k++,InsertInto(tableList,Data Table( N Table()-k )));

Data Table(N Table()) << Concatenate(tableList,Create source column);

Recommended Articles