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
CrownofTears
Level II

I cant move newly created columns to specific locations

I cant make my code work. I am trying to move some newly created columns to specific locations but I get the next error:

 

"Unrecognized key word"

 

Do you guys have any ideas of whats wrong here?

 

ColDelta=(ColNum-2)/2;
ColStart=4;

For(k=1, k<=ColDelta, k++,
	
	TabData << Move Selected Columns(
		Column (ColNum+k), after(Column(ColStart))
	);
	ColStart=ColStart+3;
	
	
);
1 ACCEPTED SOLUTION

Accepted Solutions
mmarchandTSI
Level V

Re: I cant move newly created columns to specific locations

Try adding curly braces, like this:

 

ColDelta=(ColNum-2)/2;
ColStart=4;

For(k=1, k<=ColDelta, k++,
	
	TabData << Move Selected Columns(
		{Column (ColNum+k)}, after(Column(ColStart))
	);
	ColStart=ColStart+3;
	
	
);

View solution in original post

4 REPLIES 4
mmarchandTSI
Level V

Re: I cant move newly created columns to specific locations

Try adding curly braces, like this:

 

ColDelta=(ColNum-2)/2;
ColStart=4;

For(k=1, k<=ColDelta, k++,
	
	TabData << Move Selected Columns(
		{Column (ColNum+k)}, after(Column(ColStart))
	);
	ColStart=ColStart+3;
	
	
);
CrownofTears
Level II

Re: I cant move newly created columns to specific locations

Perfect! It worked perfectly. Do you have an explanation on why or when I should use the curly braces?

mmarchandTSI
Level V

Re: I cant move newly created columns to specific locations

Well, kind of.  I tried them, because it can take a list of columns.  In this case, it seems to want even a single column in list format.

jthi
Super User

Re: I cant move newly created columns to specific locations

You might find syntax information sometimes from JMP Help Scripting Guide > Data Tables > Work with Columns > Rearrange and Move Columns or JSL Syntax Reference (can be found from JMP Documentation page)

jthi_0-1692023185552.pngjthi_0-1692023185552.png

 

-Jarmo

Recommended Articles