cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar

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 6

Re: Script Recall Button

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

wiebepo
Level III

Re: Script Recall Button

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

Re: Script Recall Button

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

Many thanks!

Re: Script Recall Button

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.

Re: Script Recall Button

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

Re: Script Recall Button

Perfect - many thanks!