Our World Statistics Day conversations have been a great reminder of how much statistics can inform our lives. Do you have an example of how statistics has made a difference in your life? Share your story with the Community!
Choose Language Hide Translation Bar
Highlighted
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
Highlighted
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
Highlighted
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

Highlighted
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
Highlighted
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.
Article Labels

    There are no labels assigned to this post.