Pictures - Data Items (Magic xpa 2.x)
A picture is a string of characters that tells Magic xpa how to define the format of an attribute. You can specify the picture format in the Picture dialog box, which is accessed from the Picture property in the Details section of the Column or Properties sheet. Magic xpa automatically defines the most commonly used pictures for data items that have known attributes (for example, dates).
You may be required to specify a picture in three different situations:
-
To define the attribute’s size and default form in the Model or Data repositories. This way you control the attribute’s data input and output representation.
Parameter Name
|
Attribute
|
Picture
|
Meaning
|
Title
|
Alpha
|
15
|
A 15-character alphanumeric parameter
|
ID Number
|
Numeric
|
### or 3
|
3-digit integer numeric parameter
|
Due Date
|
Date
|
MM/DD/YY
|
Date parameter format for input and output
|
Percent
|
Numeric
|
###.## or 3.2
|
A number parameter with 3 whole digits and up to 2 decimals.
|
-
To override the default format of an attribute to display it on a screen or report form.
-
To specify data conversion rules for Magic xpa data conversion functions. For example, the Str function translates a numeric attribute to a string representation. Therefore Str (712.93, '###.####') returns the string 712.9300.
The picture string is composed of three basic types of characters:
-
Functional directives
-
Positional directives
-
Mask characters
Each Magic xpa attribute has its own set of picture directives.
Directives for Alpha Pictures
Directives for Numeric Pictures
Directives for Logical Pictures
Directives for Date Pictures
Directives for Time Pictures
Syntax Rules