Choose Language Hide Translation Bar
Highlighted
Yngeinstn
Level IV

How to Extract Values from a Table Box( String Col Edit Box((

I was trying to add a table with string col edit boxes based on the users selection. I managed to create the table box but I can't figure out how to extract the values from the String Col Edit Boxes and then once extracted, converted to an SQL String ex.( 'teb', 'Wafer1', 'Wafer2', 'Wafer3' )

 

Thanks in advance

D

 

nw = New Window( "test",
	vlb = V List Box(
		Text Box( "Product Engineering", <<Set Font Size( 30 ), <<Set Width( 700 ), <<Set Wrap( 700 ), <<Justify Text( "Center" ) ),
		Panel Box( "Text and Number Boxes",
			lb = Lineup Box( N Col( 2 ),
				Text Box( "# Wafers to Compare?" ),
				num = Number Edit Box( 99 ),
				load = Button Box( "Enter",
					numwfr = num << Get;
					Show( numwfr );
					vlb << Append(
						hlb1 = H List Box(
							vlb7 = V List Box(
								Border Box( Sides( 15 ),
									ob = Outline Box( "5-Step Validation Wafer Select",
										Text Box( "Tested Wafer" ),
										teb = Text Edit Box( "", <<Justify Text( Center ), <<Set Width( 100 ) ),
										Spacer Box( Size( 0, 5 ) ),

									),
									wafer = {};
									For( i = 1, i <= numwfr, i++,
										Insert Into( wafer, "Wafer" || Char( i ) )
									);
									ob << Append(
										V List Box(
											tbl = Table Box( seb = String Col Edit Box( "Comparison", wafer ) ),
											Spacer Box( Size( 0, 5 ) ),
											Button Box( "Create SQL String" ) // once you type in the wafer/lot number this needs to create the SQL String
										)
									);
								)
							)
						)
					);
				)
			)
		)
	)
);

 

3 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
cwillden
Super User

Re: How to Extract Values from a Table Box( String Col Edit Box((

You can get the contents of the string col edit box using something like:

wafer_list = seb << Get;

What do you mean SQL string?  You can convert the list to a string using char(wafer_list), but you will need to use something like substitute() to swap the curly braces for parentheses or something, as well as double for single quotes if needed.  Should be relatively easy.

-- Cameron Willden

View solution in original post

Highlighted
Yngeinstn
Level IV

Re: How to Extract Values from a Table Box( String Col Edit Box((

Thank you, I didn't realize that it was that easy.. I throught you had to assign a variable to each of the boxes..

View solution in original post

Highlighted
pmroz
Super User

Re: How to Extract Values from a Table Box( String Col Edit Box((

concat items is my secret weapon for creating in lists:

 

wafer = {"ABC", "DEF", "GHI", "JKL"};

nw = new window("test", << modal(),
	tbl = Table Box( 
		seb = String Col Edit Box( "Comparison", wafer )
	),
	button box("OK",
		wafer_list = seb << get;
	)
);

show(wafer_list);

// Convert to IN list
wafer_in_list = "('" || concat items(wafer_list, "', '") || "')";
show(wafer_in_list);

From the log window:

wafer_list = {"ABC", "DEF", "GHI", "JKL"};
wafer_in_list = "('ABC', 'DEF', 'GHI', 'JKL')";

 

View solution in original post

9 REPLIES 9
Highlighted
cwillden
Super User

Re: How to Extract Values from a Table Box( String Col Edit Box((

You can get the contents of the string col edit box using something like:

wafer_list = seb << Get;

What do you mean SQL string?  You can convert the list to a string using char(wafer_list), but you will need to use something like substitute() to swap the curly braces for parentheses or something, as well as double for single quotes if needed.  Should be relatively easy.

-- Cameron Willden

View solution in original post

Highlighted
Yngeinstn
Level IV

Re: How to Extract Values from a Table Box( String Col Edit Box((

Thank you, I didn't realize that it was that easy.. I throught you had to assign a variable to each of the boxes..

View solution in original post

Highlighted
pmroz
Super User

Re: How to Extract Values from a Table Box( String Col Edit Box((

concat items is my secret weapon for creating in lists:

 

wafer = {"ABC", "DEF", "GHI", "JKL"};

nw = new window("test", << modal(),
	tbl = Table Box( 
		seb = String Col Edit Box( "Comparison", wafer )
	),
	button box("OK",
		wafer_list = seb << get;
	)
);

show(wafer_list);

// Convert to IN list
wafer_in_list = "('" || concat items(wafer_list, "', '") || "')";
show(wafer_in_list);

From the log window:

wafer_list = {"ABC", "DEF", "GHI", "JKL"};
wafer_in_list = "('ABC', 'DEF', 'GHI', 'JKL')";

 

View solution in original post

Highlighted
Yngeinstn
Level IV

Re: How to Extract Values from a Table Box( String Col Edit Box((

Thank you very much.. I was just in the process of attempting to add the tested wafer to the list then convert it to sql format.

 

Much appreciated

Highlighted
Yngeinstn
Level IV

Re: How to Extract Values from a Table Box( String Col Edit Box((

I have been searching the Scripting Guide but haven't found much on actually all the formatting options for Display Boxes.. Is there a section / website that has what you can do with what display box?

Thanks in advance
Highlighted
pmroz
Super User

Re: How to Extract Values from a Table Box( String Col Edit Box((

The Scripting Index is an invaluable resource for this kind of information.  Help > Scripting Index.   Choose Display Boxes from the dropdown and you'll see all objects and functions for display boxes.

Highlighted
Yngeinstn
Level IV

Re: How to Extract Values from a Table Box( String Col Edit Box((

I agree and have it open as well as the Scripting Guide at all times when i am scripting.. I will go back and browse there..

Thanks
Highlighted
txnelson
Super User

Re: How to Extract Values from a Table Box( String Col Edit Box((

I believe the issue that you are having, is that you are looking for Display Boxes that are designed to provide complete solutions. The JMP objects and functions are at a more base level, in that you put together multiple Display Objects and Functions into your unique final application. The advantage of this, is that the final application can be of almost any design you want. The disadvantage is, that the author of such systems needs to spend a significant amount of time learning about the wide variety of objects and functions within the language.
Jim
Highlighted
pmroz
Super User

Re: How to Extract Values from a Table Box( String Col Edit Box((

Another helpful tool is the Application Builder.  When you click and drag widgets onto the screen you can highlight them and most of the properties show up on the right hand side.

appbuilderexample.png

Article Labels

    There are no labels assigned to this post.