cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Joe
Joe
Level I

Inserting a Prompt into a script which can change column names

Hi All,

 

I am creating an automated script which people can use to input their data for analysis. The excel tabs will have preset names "Tab 1", "Tab 2" etc. so that the script works through to the data analysis.

I was wondering whether it would be possible to input a window which pops up once the JMP script is run, which they are then able to change the preset "Tab 1" names to another name which they can type in? Basically the prompt should be a text box which they can type in what they wish to rename the tab?

 

Thank you in advance,

Joe

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Inserting a Prompt into a script which can change column names

Here is a simple script that opens a display box and asks for the user's input, and returns the names of the first and second tab

Names Default To Here( 1 );
Tab1 = "Tab 1";
Tab2 = "Tab 2";
nw = New Window( "Enter Names of the Tabs",
	modal,
	V List Box(
		Text Box( "Here are the default names of the" ),
		Text Box( "tabs from the Excel file to read the" ),
		Text Box( "data from.  Please change the names" ),
		Text Box( "if the tabs have different names" ),
		Spacer Box( size( 1, 10 ) ),
		t1 = Text Edit Box( "Tab 1", <<set script( Tab1 = t1 << get text ) ),
		t2 = Text Edit Box( "Tab 2", <<set script( Tab2 = t2 << get text ) )
	)
);
Show( tab1, tab2 );
Jim

View solution in original post

1 REPLY 1
txnelson
Super User

Re: Inserting a Prompt into a script which can change column names

Here is a simple script that opens a display box and asks for the user's input, and returns the names of the first and second tab

Names Default To Here( 1 );
Tab1 = "Tab 1";
Tab2 = "Tab 2";
nw = New Window( "Enter Names of the Tabs",
	modal,
	V List Box(
		Text Box( "Here are the default names of the" ),
		Text Box( "tabs from the Excel file to read the" ),
		Text Box( "data from.  Please change the names" ),
		Text Box( "if the tabs have different names" ),
		Spacer Box( size( 1, 10 ) ),
		t1 = Text Edit Box( "Tab 1", <<set script( Tab1 = t1 << get text ) ),
		t2 = Text Edit Box( "Tab 2", <<set script( Tab2 = t2 << get text ) )
	)
);
Show( tab1, tab2 );
Jim