Subscribe Bookmark RSS Feed

How do I display a text box asking for input from the user.

EFarrell

Occasional Contributor

Joined:

Nov 8, 2016

Hi,

 

I am trying to create a basic script which analyses my data.

 

When I press the thumbnail linked to the script, I want it to

1. Ask the user to input the ranges

2. Create a data table which shows the max and min

3. Generates a graph with the min, max and the target in it.

 

So far all I can do is get the script for the data table or the graph and incorporate it into shortcuts in JMP separately. I can't figure out how to get it to generate a generate a query box for the user and I can't incorporate the graph and the data table together. Can you advise a basic tutorial set that might help with this?

 

 

Kind regards,

 

Elaina

2 REPLIES
Craige_Hales

Staff

Joined:

Mar 21, 2013

You can make either a modal or non-modal dialog in JMP with your custom prompt.

Modal dialogs won't let you do anything else until you complete them. http://www.jmp.com/support/help/Modal_Windows.shtml

Non-modal dialogs let you work in other windows and come back to the modeless window later: http://www.jmp.com/support/help/Constructing_Display_Trees.shtml#259363

A non-modal prototype of what you describe might look like this:

v1 = 30; // two numbers with default
v2 = 40; // values; these will go in a data table
w = New Window( "prototype", // opens a window with a title and this content...
    Border Box( top( 20 ), bottom( 20 ), Left( 20 ), Right( 20 ), // window dressing 
        V List Box( // V and H lists nest to organize the display boxes
            H Center Box( Text Box( "Report Generator" ) ), // a second title, centered
            Spacer Box( size( 1, 30 ) ), // a little vertical space
            H List Box( Text Box( "value 1: " ), Number Edit Box( v1 ) ), // data entry
            Spacer Box( size( 1, 10 ) ), // a little vertical space
            H List Box( Text Box( "value 2: " ), Number Edit Box( v2 ) ), // more data entry
            Spacer Box( size( 1, 30 ) ), // a little vertical space
            H Center Box( // center the button
                Button Box( "make report", // this script runs when the button is pressed...
                    // make a new table with the values...
                    dt = New Table( "Untitled", New Column( "a", Set Values( {v1, v2} ) ) );
                    // launch a platform to analyze the data...
                    dt << Distribution( Continuous Distribution( Column( :a ), Quantiles( 0 ), Summary Statistics( 0 ), Vertical( 0 ), Outlier Box Plot( 0 ) ) );
                    // optionally, close the dialog. Or, you might want to run it again...
                    w << closeWindow; // just the dialog, not the report
                )
            )
        )
    )
);

Prototype dialogPrototype dialog

Craige
ian_jmp

Staff

Joined:

Jun 23, 2011

There seems to be another instance of this thread here. Please also see the reply I posted there.