Pad Text

Adds a single character to the beginning and/or end of the specified text and places the result in a variable.

Declaration

<AMTEXTPAD ACTION="pad_both" TEXT="text" PADDINGCHAR="text" LENGTH="number" RESULTVARIABLE="text (variable name)" />

See Also: Find Text, Format Date/Time, Get Subtext, Insert Text, Replace Text, Trim Text

General Tab

Property

Type

Required

Default

Markup

Description

Text to pad

Text

Yes

(Empty)

TEXT="My Name is Joe"

The target text to be padded.

Pad

Text (options)

No

pad_beginning

ACTION="pad_end"

The location that the padding should be applied. The available options are:

  • Beginning (default): Padding will be applied to the beginning of the text.

  • End: Padding will be applied to the end of the text.

  • Beginning and End: Padding will be applied to the beginning and end of the text.

Character to pad with

Text

Yes

(Empty)

PADDINGCHAR=" "

Character to use as the padding item.

Padding type

Text (options)

No

length

PADTYPE="amount"

The padding type that should be applied. The available options are:

  • Until text is specific length (default): The padding will be repeated until the text reaches a certain length.

  • A specified number of times: The padding will be repeated x number of times regardless of the text length.

Length of text

Number

Yes if Padding Type is length

(Empty)

LENGTH="10"

The total length of the text in which padding should end. This parameter is available only if the Padding Type parameter is set to Until text is specific length.

Number of times to add

Number

Yes if Padding Type is amount

(Empty)

AMOUNT="5"

The total amount of times that the padding should be repeated. This parameter is available only if the Padding Type parameter is set to A specified number of times.

Populate variable with result

Text

Yes

(Empty)

RESULTVARIABLE="varname"

The name of the variable to receive the new value after character insertion is performed.