Salesforce

AStr (Magic xpa 2.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

AStr (Magic xpa 2.x)

Applies a selected format to a string value.

Syntax:

AStr(source string, format string)

Parameters:

'source string ' The string value to be formatted.

'format string ' The string value that determines the format of the source string value.

The characters below are placeholders or modify a corresponding character:

  • X – Any character

  • H – Any character

  • # – Any character

  • U – Corresponding character is switched to uppercase

  • L – Corresponding character is switched to lowercase

The A character, used for Auto Skip in an Edit field, is ignored.

Numbers define the repetition of the preceding format character. If a format character does not precede the number it will repeat the number of times the X format character appears.

For example: The format of 2@3U5 is the same as XX@@@UUUUU.

The backslash, \, character lets you define an operator as a fixed character.

For example: '('abcd','2@3A\U\5\A') returns 'ab@@@U5A'

If the total length of the character placeholders provided in the format string is smaller than the source string length, the remaining characters are truncated.

Returns:

The modified source string value determined by the format string.

See also:

The Online and Rich Client Samples projects (program ST01, ST04, RST01 and RST04)

Directives for Alpha Pictures

Reference
Attachment 
Attachment