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
vitali_pom
Level I

where() clause with Contains() in Data Filter

Hi,

When I try to do the following, I get an exception:


dt1 << Data Filter(


  add Filter(


  columns(:MyCol),


  Where( contains(:MyCol, "A12") > 0)


  ),


  mode(show(1))


) << invert row selection;



And I get the following exception:


The WHERE clause has not been correctly specified. in access or evaluation of 'Greater'



How to accomplish what the code tries to do properly?

1 ACCEPTED SOLUTION

Accepted Solutions
vitali_pom
Level I

Re: where() clause with Contains() in Data Filter

Figured it out:

I guess the problem is that Data Filter Doesn't understand anything but explicit comparison (==) between columns and strings, just like it's GUI.

What I found as the solution is selecting the rows with Select Where().

View solution in original post

2 REPLIES 2
vitali_pom
Level I

Re: where() clause with Contains() in Data Filter

Figured it out:

I guess the problem is that Data Filter Doesn't understand anything but explicit comparison (==) between columns and strings, just like it's GUI.

What I found as the solution is selecting the rows with Select Where().

mhalwi
Level III

Re: where() clause with Contains() in Data Filter

Hi Vitali,

need your help to comment on my script below. it is not working properly where im trying to do the data filter for the value with the correct test name only. im using Select Where and Contain method but only the numeric data is filtered and the filter for test name is not working.

Please help to comment. Your help is greatly appreciated!

df = Current Data Table() << Data Filter(
Location( {300, 196} ),
Mode( Show( 1 ), Include( 1 ) ),
Add Filter(
columns( :NUMERIC_RESULT, :TEST_NAME ),
Where( :NUMERIC_RESULT >= 5000 & :NUMERIC_RESULT <= 13000 ),
Select Where( Contains (:TEST_NAME == "ABC_0019" ),
Display( :NUMERIC_RESULT ),
Display( :TEST_NAME, Size( 204, 38 ), List Display )
),
)
)