cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
anders_bankefor
Level III

String Edit Box Function

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 4
vince_faller
Super User (Alumni)

Re: String Edit Box Function

Text Edit Box()

Vince Faller - Predictum
msharp
Super User (Alumni)

Re: String Edit Box Function

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

Re: String Edit Box Function

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
Level III

Re: String Edit Box Function

Hi,

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