Where are the Find operators (e.g. "starts with") explained?
They aren't! Here is list of what is understood to be the list of compatibilities of fields with 'operator' clauses. First though, a reminder of the five Field data types and their type numbers:
- 0 = String or Text Block
- 1 = Integer
- 2 = Decimal
- 3 = Date/Time
- 4 = URL
|
Data Type: |
|
|
String/ Text Area |
Integer |
Decimal |
Date/Time |
URL |
|
Operators: |
0 |
1 |
2 |
3 |
4 |
Notes: |
exists/ does not exist |
Yes |
Yes |
Yes |
Yes |
Yes |
1 |
contains/ does not contain |
Yes |
|
|
|
Yes |
2 |
starts with/ does not start with |
Yes |
|
|
|
Yes |
3 |
ends with/ does not end with |
Yes |
|
|
|
Yes |
4 |
matches/ does not match |
Yes |
Yes |
Yes |
|
Yes |
5 |
greater than or equal/ greater than |
Yes |
Yes |
Yes |
|
Yes |
6 |
less than or equal/ less than |
Yes |
Yes |
Yes |
|
Yes |
7 |
on or after/ after |
|
|
|
Yes |
|
8 |
on or before/ before |
|
|
|
Yes |
|
9 |
equals/ does not equal |
|
|
|
Yes |
|
10 |
Notes:
- This pair checks to see if the field contains a value or is empty (null). Thus "Filename exists" is a good query to find all records as the Filename field is always populated for a record. Alternatively, "[Field name] does not exist" will find all records of for which that field is empty. As custom fields are not automatically filled in when new records are added, this can be good way of those which have missed being completed correctly.
- This searches within a word or phrase. Thus "big house" would return a match on a string "Picture of a big house by the sea.". See also the notes on phrases in Text Area fields further below.
- As with 'contains' but this searches from the beginning of a word or phrase. Thus "big house" would not return a match on a string "Picture of a big house by the sea.", but would return "big house by the sea."
- This searches from the end of a word or phrase. In the above example "big house" would return "A big house." but not "A big house by the sea".
- The is an exact case sensitive match against the string provided. Thus "big house " would only match "big house." and none of the other examples above
- Numerical comparison. Greater than or equals "4" would return a record with the value 4 or 5+ but not 3 or below. For Decimal field of precision value 2, a search value of "4" equates to "4.00". Quite what this operator achieves with a String field is not documented.
- Numerical comparison. Less than or equals "4" would return a record with the value or 3 or less but not 5 or above. Quite what this operator achieves with a String field is not documented.
- Date/Time comparison only. Note that if no time parameter is included in the input value, Portfolio/PortWeb appears to assume a time of 00:00:00 (hh:mm:ss) for the given date. Also see notes on Date/Time field finds.
- Date/Time comparison only.
- Date/Time comparison only.
- The indexing of Text Block fields causes all words to be treated as a separate strings, so you cannot search for a phrase in a Text Block, such as the Description field or custom Text Block fields. Likewise the 'starts with/contains/ends with' operators effectively become the same operator as all comparisons are against single words - unless you search on a word fragment. For example, to find the phrase "big oak tree" in the Description field you would require a 3 argument query for "Description contains 'big' AND Description contains 'oak' AND Description contains 'tree' ". The order in which you pass the three word values does not matter as the query "Description contains 'oak' AND Description contains 'big' AND Description contains 'tree' " would still find the same matches. In fact this query would find any of these phrases - "big oak tree", "big tree oak", "oak tree big", "oak big tree", "tree big oak" and "tree oak big".
- Upper case (u/c) characters in parameter values are used in a case sensitive manner but lower case (l/c) ones are not. Thus, thus "hotel" finds "Hotel" and "hotel" whereas "Hotel" only finds "Hotel". In this context u/c should be read to mean all u/c or mixed u/c and l/c strings, e.g. "HOTEL", "Hotel", or "LaCie". This is explained in the table below:
Case Sensitivity |
Operator |
String |
Text area |
If search string is -> |
u/c |
l/c |
u/c |
l/c |
contains/ does not contain |
Yes |
No |
Yes |
No |
starts with/ does not start with |
Yes |
No |
Yes |
No |
ends with/ does not end with |
Yes |
No |
Yes |
No |
matches/ does not match |
Yes |
Yes |
Yes |
Yes |
Question: Where are the Find operators (e.g. "starts with") explained? [FAQ00208.htm]
Last Update:- 01 June 2006