Subscribe Bookmark RSS Feed

Script Recall Button

I have a script that prompts user with a column dialog box to select columns for X-var, Y-var, etc. I want to add a "Recall" button so that when user clicks it, it will fill in the choices from last time automatically, like most of the JMP platforms do.

Can this be accomplished using column dialog box (using something like button("recall")), or could it only work for nonmodal dialog box? Also, is there an example illustrating how to write a script for the Recall button?
6 REPLIES

I'd like to be able to do this also.  Does anyone know how?

wiebepo

Community Trekker

Joined:

Oct 10, 2011

There are several ways to do this. The following example by Wendy Murphry would mimic the behavior of the recall buttons in other platforms. http://www.jmp.com/support/notes/46/984.html

Perfect. (I'd mark the problem as "Solved", but I didn't start the discussion so I don't think I can.)

Many thanks!

Following on from the above post, I'd like to add some functionality to the various Col List Boxes in Wendy's script that would make filling in one of them mandatory, with at least two columns from the data table (so if I were using a Column Dialog to do this, I'd be setting the "min col" option of one of the boxes to 2).  In the example they're all optional, and I can't see any properties of a Col List Box that would enable me to do that.  Can someone show me how to do it please?

BTW: I don't think I can use a Column Dialog instead, because I need to add other functionality to the dialog as well - and creating a modal window along the lines of Wendy's script seems the easiest way to set it up.

Many thanks for any help received.

Wendy_Murphrey

Joined:

Jun 23, 2011

Hello,


The MinItems(n) option for Col List Box will allow you to specify a minimum number of columns for the list.  See the Col List Box entry in the JSL Syntax Reference in Appendix A of the JMP Scripting Guide for futher details.  You can view this PDF by clicking on the Help menu and select Books > Scripting Guide.


Below is an excerpt from Sample 46984 to demonstrate:

Panel Box( "Cast Selected Columns into Roles",
   Lineup Box( N Col( 2 ), Spacing( 3 ),
       Button Box( "Y, Response", colListY << Append( colListData << GetSelected ) ),
       colListY = Col List Box( width( lbWidth ), nLines( 5 ), numeric, MinItems(2) ), //HERE
       Button Box( "X, Factor", colListX << Append( colListData << GetSelected ) ),
       colListX = Col List Box( width( lbWidth ), nLines( 1 ), numeric ),
       Button Box( "By", colListB << Append( colListData << GetSelected ) ),
       colListB = Col List Box( width( lbWidth ), nLines( 1 ) )
   )
),


Hope that helps!

Wendy Murphrey

Wendy

Perfect - many thanks!