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
datanaut
Level III

JSL prompt user for data table name (not saving)

My first JMP community post!

 

JSL has been enormously helpful for me in my work.  Thanks all for your inputs.

 

I'm running a script which concantenates two files.  I'd like to prompt the user when it's complete (or before it starts, doesn't matter) for what s/he would like to name the data table.  The user can then save the data table later if s/he is happy with it.  I don't want to obligate a file save just after table creation.  

 

I searched online and could not find anything directly applicable.

 

Thanks all.

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: JSL prompt user for data table name (not saving)

Congratulations on your first post.

There are examples in the Scripting Guide that should help you to interpret the simple example I am providing below.

     Help==>Books==>Scripting Guide

Names Default To Here( 1 );
dt = Current Data Table();

nw = New Window( "Name data table",
	<<Modal,
	<<Return Result,
	Text Box( "What do you want to name the data table?" ),
	tableName = Text Edit Box( " ", <<set width( 400 ) )
);
If( nw["button"] == 1 & nw["tableName"] != "",
	dt << set name( nw["tableName"] )
);
Jim

View solution in original post

3 REPLIES 3
txnelson
Super User

Re: JSL prompt user for data table name (not saving)

Congratulations on your first post.

There are examples in the Scripting Guide that should help you to interpret the simple example I am providing below.

     Help==>Books==>Scripting Guide

Names Default To Here( 1 );
dt = Current Data Table();

nw = New Window( "Name data table",
	<<Modal,
	<<Return Result,
	Text Box( "What do you want to name the data table?" ),
	tableName = Text Edit Box( " ", <<set width( 400 ) )
);
If( nw["button"] == 1 & nw["tableName"] != "",
	dt << set name( nw["tableName"] )
);
Jim
Jeff_Perkinson
Community Manager Community Manager

Re: JSL prompt user for data table name (not saving)

@datanaut, did the response from @txnelson above work for you? 

-Jeff
datanaut
Level III

Re: JSL prompt user for data table name (not saving)

This is very helpful. Please pardon my record setting response time. I didn't log back in to check on this. I'll do better here. Thanks again.