cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
steveylin
Level II

Adding a search field to custom launch window

steveylin_0-1675810729695.png

steveylin_1-1675810766315.png

I have code here to create a custom launch window, as seen in the first image.  Is there a way to add a filter similar to what we normally see when we select analyze from menu?

 

 

clearCols = Expr( // Expression to clear all current settings
    selTests << Remove All;
);

recallCols = Expr(
    ::testsRecall = selTests << Get Items;
);

dt = Current Data Table();

/* Custom Launch Window */
selTestsWindow = New Window( "Test Selection for dashboard", // GUI to select test to analyze
    <<Modal, 
    <<return result, 
    Border Box( Left( 3 ), top( 2 ), 
        V List Box(
            H List Box(
                V List Box(
                    Panel Box( "Select Columns", 
                        colListData =
                        Col List Box( all, <<set data type( "Numeric" ) )
                    ), 
                ), 
                V List Box(
                    Panel Box( "Tests", 
                        Lineup Box( N Col( 2 ), Spacing( 3 ), 
                            Button Box( "Y, Response",
                                selTests <<
                                Append( colListData << Get Selected )
                            ), 
                            selTests =
                            Col List Box( MinItems( 1 ), "Numeric" ), 
                        )
                    ), 
                ), 
                Panel Box( "Action", 
                    Lineup Box( N Col( 1 ), 
                        okButton = Button Box( "OK",
                            recallCols;
                            test_list = selTests << Get Items;
                        ), 
                        Button Box( "Cancel" ), 
                        Text Box( " " ), 
                        Button Box( "Remove", 
                            selTests << Remove Selected;
                        ), 
                        Button Box( "Recall", 
                            clearCols;

/* Restore any previous settings from the global variables */
                            Try(
                                selTests << Append( ::testsRecall );
                            );
                        ), 
                        Button Box( "Reset", clearCols ), 
                    )
                )
            )
        )
    )
);

clearCols = Expr( // Expression to clear all current settings
    selTests << Remove All;
);

recallCols = Expr(
    ::testsRecall = selTests << Get Items;
);

 

JMP 16.1 MacOS

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Adding a search field to custom launch window

The box with the Find / Search functionality is the Filter Col Selector.  Because it is a composite box it can be a little more challenging to script - you will find discussions on the Community that may help for common use cases, such as this one that describes how you can show the filter field by default.

 

View solution in original post

2 REPLIES 2

Re: Adding a search field to custom launch window

The box with the Find / Search functionality is the Filter Col Selector.  Because it is a composite box it can be a little more challenging to script - you will find discussions on the Community that may help for common use cases, such as this one that describes how you can show the filter field by default.

 

steveylin
Level II

Re: Adding a search field to custom launch window

Thanks Dan.  I got this code to work:

 

 

Panel Box( "Select Columns",
                 colListData = Filter Col Selector(dt),
                 colListData[IfBox(1)] << Set(1),
                 //colListData = Col List Box(all,<<set data type("Numeric"))