- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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?
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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().
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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().
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: where() clause with Contains() in Data Filter
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 )
),
)
)