Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
DavidLeber
Level III

TableBox Auto Sort-by-when-clicking

In some platforms, like Process Screening, the TableBoxes are set up to automatically sort by a column when that column's header is clicked.

 

When I just create my own tableBox, this doesn't happen, I have to right-click and "Sort by Column Header".

 

How can I configure my TableBoxes (using JSL) to automatically sort by column when the column's header is clicked?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: TableBox Auto Sort-by-when-clicking

You are looking for this option for a table box tb:

tb << Set Click Sort(1);

To have a full example: 

New Window( "Mountains",
	tb = Table Box(
		String Col Edit Box(
			"Mountain",
			{"K2", "Delphi", "Kilimanjaro",
			"Grand Teton"}
		),
		Number Col Edit Box(
			"Elevation (meters)",
			{8611, 681, 5895, 4199}
		),
		Plot Col Box( "", {8611, 681, 5895, 4199} )
		
	) 
);
// optional forced sorting
tb << Sort by Column(1,1);
wait(2);
tb << Sort by Column(1,0);
wait(2);
tb << Sort by Column(2,1);
// What you want: Sort on Click
tb << Set Click Sort (1);

 

 

 

 

View solution in original post

1 REPLY 1
Highlighted

Re: TableBox Auto Sort-by-when-clicking

You are looking for this option for a table box tb:

tb << Set Click Sort(1);

To have a full example: 

New Window( "Mountains",
	tb = Table Box(
		String Col Edit Box(
			"Mountain",
			{"K2", "Delphi", "Kilimanjaro",
			"Grand Teton"}
		),
		Number Col Edit Box(
			"Elevation (meters)",
			{8611, 681, 5895, 4199}
		),
		Plot Col Box( "", {8611, 681, 5895, 4199} )
		
	) 
);
// optional forced sorting
tb << Sort by Column(1,1);
wait(2);
tb << Sort by Column(1,0);
wait(2);
tb << Sort by Column(2,1);
// What you want: Sort on Click
tb << Set Click Sort (1);

 

 

 

 

View solution in original post

Article Labels

    There are no labels assigned to this post.