Log In    |    Knowledge Base    |    4D Home
Tech Tip: Searches Containing "@" in 4D v6.5
Published On: June 25, 1999

4D 6.5 can search on strings that contain the @ symbol. For example it is possible to search a field that contains e-mail addresses like you would any other field. For example:


Implement this by turning on the "Consider @ as a character for Query and Order By" option in the Database properties dialog. When this option has been set, the database will need to be restarted and at that point the indexes will be rebuilt.

This feature affects all searches, sorts and string comparisons for fields and variables. It only affects these operations where the @ character is in the middle of a string. If the @ character is used at the beginning or end of the search criteria in a search, it will be considered a wildcard character.

For example:

ARRAY TEXT($array;3)


$ele:=Find in array($array;"a@")  ` returns 1
$ele:=Find in array($array;"a@a")  ` returns 2