Subscribe Bookmark RSS Feed

String Edit Box Function

anders_bankefor

Community Trekker

Joined:

Dec 8, 2015

Hi,

I've managed to use the Number Edit Box() function combined with Char() to retrive strings from a column in order to delete specific rows from my tables. However my code does not work for all situations, why?

Is there another Edit Box for strings? Does anyone have another sugestion for entering strings (through a edit box), comparing each value in a specified column to that string and if match/not match fill a second column with Yes/No? The values in the specified columns will have format character but be a mix of numbers and chars.

I've got the following code:

Window= New Window( "Statement here...",

ListREF = {};

ListOBJ = {};

H List Box(

Text Box( "Statement here...", " ),

Spacer Box( size( 1, 10 ) ),

editBox= Number Edit Box( "" ),

i = 1;

j = 1;

Spacer Box( size( 1, 10 ) ),

 

Button Box( "Statement here...", ",

 

Data Table( "Main Table" ) << Select Where( :Column3== (Char( editBox<< get )) );

editBox<< Set( . );

Data Table( "Main Table" ) << Subset( Invisible, (Selected Rows) );

Selected( Row State( 10 ) ) = 1;

Data Table( "Table" ) << delete rows;

.......

Output:

Before deletion:

Main Table

Col1                     Col2[Numeric]                 Col3 [character]

Obj1                     1234                                "MyObject"

Obj2                     5678                                 "MyRef1"

in my Edit Box I type MyRef1 and the result is:

Main Table

Col1                     Col2[Numeric]                 Col3 [character]

Obj1                     1234                                "MyObject"

Subset Main Table

Col1                     Col2[Numeric]                 Col3 [character]

Obj2                     5678                                 "MyRef1"

4 REPLIES
vince_faller

Super User

Joined:

Mar 17, 2015

Text Edit Box()

msharp

Super User

Joined:

Jul 28, 2015

If you have difficulties learning the JSL syntax, I would recommend getting familiar with the Scripting Index.  Help >> Scripting Index.  This is a great resource for JSL coding.

txnelson

Super User

Joined:

Jun 22, 2012

I will echo what msharp said, plus I will had that I found reading of the 1st 200 pages of the scripting guide, available in JMP Help==>Books==>Scripting Guide.

I found that it gave me that solid overall understanding of the different JSL structures.

Jim
anders_bankefor

Community Trekker

Joined:

Dec 8, 2015

Hi,

yes I was actually searching for edit boxes in the scriptguide but somehow I missed it. Thank you all for your help.