# SearchContactsBySystemField - Advanced Documentation ## Overview Searches contacts by a specified system field value for the current company. ## Parameters - **SystemFieldName** - identifies which built-in contact field to search against (truncated to 50 characters via `CleanString()`) - **Filter** - search value; processed through `FixPeopleFilter` (reverses "Last, First" to "First Last") and truncated to 50 characters ## Matching Behavior - Uses prefix matching by default - the stored procedure `spSearchContactsBySystemField` appends `%` to the filter - Callers can include `%` wildcards in the Filter for flexible matching - Empty or whitespace-only filters return an empty list immediately (no database call) ### Wildcard Examples | Filter | SQL Becomes | Matches | |--------|-------------|---------| | `Smith` | `LIKE 'Smith%'` | Contacts starting with "Smith" | | `%Smith` | `LIKE '%Smith%'` | Contacts containing "Smith" anywhere | | `%Smith%` | `LIKE '%Smith%%'` | Same as above (redundant trailing %) | ## Return Structure Returns `BaboContactInfoBasic` objects sorted by contact name. Used by the GeneralSearch dialog. ## Security User must be logged in and have a company selected. Results are scoped to the current company's contacts.