Choose Language Hide Translation Bar
Highlighted
hahahaqing
Level II

Select corresponding rows according to user input

Hi, I am running a JMP script and want to select corresponding rows according to user input.

For example, this is my table

        Device    length   width

1        A            0.5        0.6

2        B            0.7        0.8

3        C           1.0         0.6

 

Here is the script I wrote but it doesn't work... Any ideas would be really appreciated! 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
txnelson
Super User

Re: Select corresponding rows according to user input

The modal boxes act differently than just plain display boxes.  Take a look at their documentation in the JMP Documentation Library.  Below is a working version of your script

dt = Current Data Table();
win = New Window( "number",
	<<modal,
	<<returnresult,
	V List Box(
		device_box = Text Edit Box( "" ),
		width_box = Number Edit Box(),
		length_box = Number Edit Box()
			
	)
);

dt << select where(
	:device == win["device_box"] & (:length == win["length_box"])
	 & :width == win["width_box"]
);
Jim

View solution in original post

2 REPLIES 2
Highlighted
txnelson
Super User

Re: Select corresponding rows according to user input

The modal boxes act differently than just plain display boxes.  Take a look at their documentation in the JMP Documentation Library.  Below is a working version of your script

dt = Current Data Table();
win = New Window( "number",
	<<modal,
	<<returnresult,
	V List Box(
		device_box = Text Edit Box( "" ),
		width_box = Number Edit Box(),
		length_box = Number Edit Box()
			
	)
);

dt << select where(
	:device == win["device_box"] & (:length == win["length_box"])
	 & :width == win["width_box"]
);
Jim

View solution in original post

Highlighted
hahahaqing
Level II

Re: Select corresponding rows according to user input

Thank you for your response so much!!! It's working now!

Article Labels