cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.
  • JMP will suspend normal business operations for our Rest and Recharge Day on Friday, October 2, 2026.
    Regular business hours will resume on Monday, October 5, 2026.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
elad
Level I

Need help with getting input from a Text Edit Box

Hi All, 

I need help with getting input from a "Text Edit Box". After the user inputs the Lot Number (Lot_Num variable), i wanna use it as a numaric/text value. when i try to print Lot_Num, i can see that the output is not the string the user put in the "Text Edit Box".

This value will need to be placed in a new row for existing data table.

 

User_Input = New Window( "Enter Lot Number",
Text Box( "Enter Lot Num:" ),
Lot_Num = Text Edit Box( "", <<set width( 200 ) ),
Button Box( "Click To Save", User_Input << close window ),
);
Print( Lot_Num );

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Need help with getting input from a Text Edit Box

The "Lot_Num" variable that you are referencing, is not the value of the Text Edit Box(), but rater a pointer to the object.  Here is an example from

     Help==>Scripting Index==>Text Edit Box

Names Default To Here( 1 );
win = New Window( "Example",
	fontobj = text = Text Box( "Example Text" )
);
Print( text << Get Text() );
Jim

View solution in original post

3 REPLIES 3
txnelson
Super User

Re: Need help with getting input from a Text Edit Box

The "Lot_Num" variable that you are referencing, is not the value of the Text Edit Box(), but rater a pointer to the object.  Here is an example from

     Help==>Scripting Index==>Text Edit Box

Names Default To Here( 1 );
win = New Window( "Example",
	fontobj = text = Text Box( "Example Text" )
);
Print( text << Get Text() );
Jim
elad
Level I

Re: Need help with getting input from a Text Edit Box

Did the trick. Thx...

pmroz
Super User

Re: Need help with getting input from a Text Edit Box

The lot_num variable points to the text edit box, not the text itself.  Here's some code that shows how to get the value, and also uses a modal window so that processing stops until you click OK.

User_Input = New Window( "Enter Lot Number", << modal(),
	hlistbox(
		Text Box( "Enter Lot Num:" ),
		Lot_Num_teb = Text Edit Box( "", <<set width( 200 ) ),
	),
	text box("Click OK to save"),
	Button Box( "OK", 
		lot_num = lot_num_teb << get text();
	),
);
Print( Lot_Num );

Recommended Articles