BookmarkSubscribeRSS Feed
Highlighted
datanaut

Community Member

Joined:

Jul 10, 2018

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 REPLY
txnelson

Super User

Joined:

Jun 22, 2012

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