Trim Text

Removes characters from the beginning and/or end of the specified text and places the result in a variable. Used to take spaces off of the beginning or end of a value text value. These spaces can sometimes be cause by data-entry error or a formatting routines from external applications.

Declaration

<AMTEXTREMOVE TEXT="text" REMOVE="text" CHARACTERS="text" ACTION="text [options]" RESULTVARIABLE="text [varibable name]">

See Also: Find Text, Get Subtext, Insert Text, Pad Text, Replace Text, Format Date/Time, Convert Case, Pad Text

General Tab

Property

Type

Required

Default

Markup

Description

Text to remove from

Text

Yes

(Empty)

TEXT="My Name is Joe"

The target text to be trimmed.

Remove from

Text (options)

No

beginning and end

ACTION="remove_end"

Specifies where the text is trimmed. The available options are:

  • beginning and end: The text is stripped from the beginning and end of the target text.

  • beginning: The text is stripped from the beginning of the target text.

  • from end: The text is stripped from the end of the target text.

Remove

Text (options)

No

Whitespace

REMOVE="returns"

The character(s) to remove from the string. The available options are:

  • Whitespace: All whitespace characters are removed from the string

  • Carriage returns: Carriage returns are removed from the string

  • Spaces: Spaces are removed from the string

  • Tabs: Tabs are removed from the string

  • User defined: The text entered in the Characters to Remove parameter are removed from the string.

Characters to remove

Text

Yes if Remove parameter is User defined

(Empty)

CHARACTERS="x"

The user defined characters to remove. This parameter is active only if the Remove parameter is set to User defined.

Populate variable with result

Text

Yes

(Empty)

RESULTVARIABLE="varname"

The name of the variable to receive the new formatted text value.