JSL:Selecting cols with Filter Col Selectior and hot spot functionality Show Filter as "default"
I just came around a question from a customer which I found worth sharing to the scripting community and those who would like to become part of it :)
In any platform where you can select the columns to drag them into roles you have the option in these little red triangles (hot spots) to show a filter, which helps you to search for column names you are interested in. A very helpful feature if you have more variables than just a few!
Now let's imagine you want to build up an application using this column filter in your own window. You can open up the Scripting Index under Help -> Scripting Index and search for "col filter". "Filter Col Selector" will appear quite prominent in the first rows of the results list of commands. Well, that's a good start. There is even an example.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
New Window( "Col List Box Example",
fontobj = lb = Filter Col Selector( width( 250 ) )
This results in this window:
So far so good, but where is my filter???
What you should always remind are commands like Show Properties(), as they will show you in the log all options you have to apply to this object, in this case fontobj.
This will create a bunch of commands, however what you really want is one of the following three:
Name contains [Action] [Scripting Only]
Name starts with [Action] [Scripting Only]
Name ends with [Action] [Scripting Only]
Another way to look out for commands to be used on Filter Col Selector is the Scripting Index, this time not searching, but looking into the category list and select Filter Col Selector. Then those actions appear in the middle of the Scripting Index Window.
So using one of these commands you'll get the filter right after creating the window and somehow set it as default for your Filter Col Selector Window:
fontobj << Name Contains (" ");
Please be aware that you need to at least enter a space, otherwise the filter won't appear. This will be the result:
I hope you found this as valuable as I did or at least it reminded you to check out for what JMP provides you using Help or commands like Show Properties() or Show Tree Structure() and others.