Category: Text

Syntax: trim ( text )


textAny expression that resolves to a text string.

Data type returned: Text


Returns the specified text string with any leading or trailing spaces removed.

The TRim() function removes only leading and trailing spaces and not any other characters (such as carriage returns).

trim() can be used to reformat data where users have inadvertently typed spaces at the end of an entry. This happens frequently with fields containing first names. To automatically have the entry reformatted when the user exits the field, have the field auto-enter trim (FirstName) and uncheck the option not to replace any existing value in the field. Thus, if a user enters "Fred" into the FirstName field, it is replaced with "Fred" when the user exits the field.

TRim() is also used frequently to clean up fixed-width data that has been imported from some other data source. In such cases, fields have been padded with leading or trailing spaces to be a certain length. Remove them after importing by doing calculated replaces in the appropriate fields.




trim (" This is a test ")

Returns This is a test.

: FileMaker Specifications

FileMaker 8 Product Line

Specifications and Storage Limits

Field Types and Import/Export Formats

: Calculation Functions

Working with Calculations Primer

Calculation Signatures

Calculation Functions

: Custom Functions

Custom Functions Primer

Useful Custom Functions

: Script Steps

Scripting Primer

Script Step Reference

: Quick Reference

FileMaker Error Codes

FileMaker Keyboard Shortcuts

FileMaker Network Ports

FileMaker Server Command Line Reference

FileMaker XML Reference

: Other Resources

Where to Go for More Information

FileMaker 8 Functions and Scripts Desk Reference
FileMaker 8 Functions and Scripts Desk Reference
ISBN: 0789735113
EAN: 2147483647
Year: 2004
Pages: 352 © 2008-2020.
If you may any questions please contact us: