cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
0 Kudos

ability to set a function that would trigger when a tablebox is sorted using <<sort by Column

This is coming to my attention because there are some things that don't seem to work right when a tablebox gets sorted using << sort by column (more so in prior JMP versions).  But this would also be useful if you want to try to line something up next to a tablebox and aligned to some of the table box content.

 

Related to my other wish to have the ability to disable the possibility to sort by Column:option to disable Sort by Column for a tablebox - JMP User Community

3 Comments
SamGardner
Staff
Status changed to: Needs Info

@hardner have you submitted the table sorting issue you are seeing to JMP Technical Support (support@jmp.com)?  I am wondering what you mean when "some things done seem to work right when a tablebox gets sorted".  

 

Would you also be able to describe the situation and what it is you are trying to do?

In JMP16, you can set for each column in a table a "context menu" that would be available by right-clicking the column header in the table. (search for "Set Context Menu Script") in the Scripting Index (Help > Scripting Index)).  This context menu can have multiple items and allows you to run a script when the context menu item is selected.  You could make your own sort context menu that then would allow you to run whatever JSL you wanted when the table is sorted.  

hardner
Level V

I agree this is solved by the ability to prevent users from sorting the table by overwriting the context menu - a colleague figured this out and it solves both this wish to know that a sort was triggered and another one I had about disabling the user sorting.

 

I did already make a support case about the following :  when a tablebox gets sorted the elements in a colbox that's part of the table do not get rearranged and there appears to be no way to access what row of the table the displaybox  colbox(n)[1] is now on. 

 

for example:

 

 

Names Default To Here( 1 );
New Window( "Mountains",
    tb = Table Box(
        String Col Box( "Mountain", {"K2", "Delphi", "Kilimanjaro", "Grand Teton"} ),
        Number Col Box( "Elevation (meters)", {8611, 681, 5895, 4199} ),
        c = Col Box(
            "",
            Check Box( "" ),
            Check Box( "" ),
            Check Box( "" ),
            Check Box( "" )
        )
    )
);

c[1] << set( 1 );
tb << sortby column( "Mountain" );
Show( (tb[String Col Box( 1 )] << get)[2] );
Show( c[1] << get );
Show( c[2] << get );

 

 

 

mia_stephens
Staff
Status changed to: Delivered

Thank you for updating this post and for providing the example. We're changing the status to Delivered.