Salesforce

Directives for Numeric Pictures (Magic xpi 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

Directives for Numeric Pictures (Magic xpi 3.x)

The tables below provide a list of positional directives for Numeric pictures.

Numeric Positional Directives

Directive

Description

#{n}

A placeholder for a digit.

.

Indicates the location of the decimal separator, as defined in the Magic.ini file.

Numeric Functional Directives

Directive

Name

Description

N

Negative

Instructs Magic xpi that this variable may contain negative values. If Yes is specified, Magic xpi automatically enlarges the display size of the picture, as portrayed by the template, to enable a sign to be displayed.

Default: No

C

Commas

Instructs Magic xpi to insert commas as thousands separators in the variable. If you specify Yes, Magic xpi automatically enlarges the display size of the picture, as portrayed by the template, to include positions for commas. Commas may be replaced by any other character as specified in the Thousand Separator setting in the Magic.ini file.

Default: No

L

Left justify

Instructs Magic xpi to left-justify the variable value when displayed.

Default: No (right-justified)

Pc

Pad fill

Instructs Magic xpi to fill the part of the displayed variable that does not contain digits with the character specified in “Character:” If you do not specify a character, the variable is padded with blanks.

Default: No

Zc

Zero fill

Instructs Magic xpi to fill the entire displayed variable with the Character value if its value is zero. If you do not specify any character, the variable is padded with blanks.

Default: No

-c{,S};

Negative sign

Lets you enter a prefix and/or suffix that will be displayed when the field is negative.

If you want to display a string instead of the conventional minus sign (-) to indicate a negative value, use the - directive followed immediately by the new sign prefix, a comma, the new sign suffix, and then a semicolon (;). To display a string at the end of a negative value, type the string you want in the Suffix parameter.

For example:

  • The picture N4.3+,CR;-,DB; specifies that positive numbers should be suffixed with the string CR and negative numbers with the string DB.

  • The picture N10.2C+$;-$-; specifies that both negative numbers and positive numbers will be prefixed with a $ sign.

This directive is used often to display currency symbols.

+c{,S};

Positive sign

Lets you enter a prefix and/or suffix that will be displayed when the field is positive.

If you want to display a string instead of the conventional plus sign (+) to indicate a positive value, use the + directive followed immediately by the new sign prefix, a comma, the new sign suffix, and then a semicolon (;). To display a string at the end of a positive value, type the string you want in the Suffix parameter.

For example:

  • The picture N4.3+,CR;-,DB; specifies that positive numbers should be suffixed with the string CR and negative numbers with the string DB.

  • The picture N10.2C+$;-$-; specifies that both negative numbers and positive numbers will be prefixed with a $ sign.

This directive is used often to display currency symbols.

For variables with the Numeric attribute, the # directives, the count values, and the optional decimal position character define the number of digits in the whole part and in the decimal part. This in turn defines the default storage field model and length of the variable.

Note:

n - represents the count value.

{ } - represents an optional part.

c - represents a mask character. To use a directive character, for example X, where c appears, preface it with a backslash, as in \X.

Related Topics

Reference
Attachment 
Attachment