Page History
...
Operator | Description | Applicable Data Types | Example | ||
---|---|---|---|---|---|
|| | OR: Used to implement a logical OR for two or more search conditions in the same data provider | Any |
| ||
| | Format: Used to separate a value and an implied format. | Date |
| ||
! | Not: Used to implement a logical NOT for a search condition. | Any |
| ||
# | Sensitivity Modifier: Implies a case-insensitive search for text columns. Implies a match on entire day for date columns. | Text, Date |
| ||
^ | Is Null: Matches records where a column is null. | Any |
| ||
^= | Is Null/Empty/Zero: Matches records where a column is null, empty string value or zero numeric value | Text, Numeric |
| ||
< | Less than: Matches records where the column is less than the operand | Any |
| ||
<= | Less than or equal to: Matches records where the column is less than or equals the operand | Any |
| ||
>= | Greater than or equal to: Matches records where the column is greater than or equals the operand | Any |
| ||
> | Greater than: Matches records where the column is greater than the operand | Any |
| ||
... | Between: Matches records where the column is between (inclusive) the left and right operands. | Any |
| ||
% | Wild Card String: Matches records based on matching characters and wild cards | Text |
| ||
_ | Wild Card Character: Matches records based on | Text |
| ||
\ | Escape Character: Used to escape other string operators | Text |
| ||
now | Now: Matches records where the condition is right now, including time | Date |
| ||
today | Today: Matches records where the condition is any time today | Date |
|
Using find mode from scripting without using special operators or spaces
You can use find mode with non-strings as well. For example, dates, numbers are not interpreted and will be used literally.
Arrays can be used when searching for multiple values, these are also not interpreted.
Code Block |
---|
if(foundset.find()) {
city = ['Berlin', 'Amsterdam'] // city in (?, ?) {'Berlin', 'Amsterdam'}
companyid = 42; // literal numerical value
startdate = new Date(99,5,24,11,33,30,0); // literal date value
foundset.search(); // Execute the query and load the records
} |
Note that when you use a string for searching, it will be trimmed (except in case of a CHAR column, which is padded with spaces by the database).
If you want to make sure the argument is not interpreted, us a single-element array:
Code Block |
---|
if (foundset.find()) {
// tag = ' Hello Servoy '; // would search for trimmed
tag = [' Hello Servoy ']; // will search for literal (untrimmed)
foundset.search(); // select ... from ... where tag = ? {' Hello Servoy '}
} |
Find Mode and the User Interface
...