| LEFT$(string_exp$, n) |
Returns a String Value
Returns a string up to n characters long consisting of the leftmost characters of string_exp$. If
string_exp$ is less than n characters long, a copy of string_exp$ is returned.
Function Use
This function can be used when filtering records or formatting how dates are displayed or returned.
Filtering Examples
The following examples are ways in which you can use this function to filter records.
You want to see only statements for clients whose last name begins with Smith (e.g., “Smith,” “Smithson,” “Smithy,” etc.).
LEFT$(CLIENT_ID:NAME,5) = "Smith"
Note: This expression can be added to any existing filter. Simply click the New Advanced Row button, enter the expression in the Expression field, and click OK.
Formatting Examples
LEFT$("John Q. Public",3)
Returns "Joh".
LEFT$("John", 8)
Returns "John".
LEFT$("John", 0)
Returns "".
Other Resources
- Expression Examples
- Filtering Records
- Knowledge Base Article R11493 - All About Expressions
- Knowledge Base Article R11515 - Filter Expression Examples
- Knowledge Base Article R11487 - Working with Indexes, Filters, and QuickViews
- Knowledge Base Article R10750 - Report Writer, Filter, and WorkFlow Functions (provides link to downloadable .pdf)