Data types dictionary
Classic Function | function code | GESATY |
---|
A data type is a code that describes the format and behavior of data elements such as properties in classes or representations, and columns in tables. Every dictionary describing data structures refers, for its elements, to data types.
This workbench function allows users to create and update data types. The data type dictionary already existed in version 6, but it has been extended to support the new features available in the class management.
When creating or updating a data type, it is necessary to enter information in several sections:
Header | General | Classic information | Class information |
See also Additional comments.
Contains information to identify the data type.
Uniquely identifies the data type.
Describes the class.
The following information is defined in this tab:
Used to protect specific classes during the standard patching process (if starting with X, Y, or Z), or to make them optional. It behaves similar to all the activity codes defined in dictionaries.
Technical module the data type is associated with.
Defines the internal data type as managed by the Sage X3 engine. This information is referenced in a local menu. The following choices are available:
Data type | Usage |
---|---|
Local menu | An integer value between 0 and 255. Used when bytes must be managed. |
Short Integer | An integer value in [ -32,768 to +32,767 ] range. |
Long Integer | An integer value in [ -2^32 to +2^32-1 ] range. |
Decimal | A decimal value with a precision given by the 'Length' parameter. |
Floating | A single precision floating point value. The number of digits can be limited by the 'Length' parameter. This data type depends on the hardware in which the program is executed; therefore, its use should be limited to special cases (for example, if such a field exists in a database description). |
Double | A double precision floating point value. The number of digits can be limited by the 'Length' parameter. The same limitation for the Floating type applies. |
String | A character string value. The maximum number of characters available is limited by the 'Length' parameter. |
Date | A date without time information. |
Image file | A BLOB value. The detailed definition of the format is done in the 'Class' section. |
Text file | A CLOB value. The detailed definition of the format is done in the 'Class' section. |
UUID | A unique identifier. |
Datetime | A date value including the time (managed independently from the time zone). |
Used for string and numeric data types:
Length | Memory size | Maximum characters |
---|---|---|
0 | 1020 | 510 |
1 | 2044 | 1022 |
2 | 4092 | 2046 |
3 | 8128 | 4094 |
N | 1024*(2^N)-4 | 512*(2^N)-2 |
When a data type is a tiny integer, it is usually attached to a local menu that gives a list of possible choices to input values in the user interface. This field relates to the local menu function.
This section defines all the necessary information to support the Classic mode. The information presented was already in the version 6 data type dictionary, and will become deprecated when the Classic mode becomes useless.
Defines the object code associated with the data type if it exists. This will allow the automatic switch from read-only pages mode to Classic mode to be done when a user requests a modification on a record displayed in a detail facet.
Displays the main table associated with the Sage X3 version 6 object, if there is any.
Used to indicate the "adonix" format of the data type. This format must be coherent with the internal type. The format must conform to the Adonix syntax. Only the part located at the right of the ":" should figure in this field. Ex : 10X , 3A2B. The detail of existing syntaxes is given in the format version 6 documentation.
For a variable format, it should be preceded by "=". Ex : =[F:DEV]FM92.
Used to optimize the display of the large grids. If the grid format check box is selected, the variable format will be computed on every line. This is reserved for standard data types because it requires a particular process by the supervisor.
When this happens, the parameter fields represent the parameter code to enter in the data type screen management, and the variable represents the field that will be initialized by the parameter value in the 'before_entry' action of the bottom of the grid variable.
Default values proposed by default on the fields of that type.
This grid is used to declare the actions predefined in the actions dictionary. For all fields having this data type, the actions defined will be systematically executed.
If a single action is defined for both the data type and the screen field, the actions will be executed consecutively and in the following order:
This grid allows you to define the specific actions associated with the field.
Defines the action type associated with the data type. The action types are:
Action type | Use |
---|---|
Before-field | Action before any entry or display of the field. It can be used to define the format of the field. |
Init_button | Used to define the button titles of the contextual menu. |
Init | Used to initialize a field. |
Before_entry | Action carried out before each entry. It can be used to position the system variable 'mkstat' without having to enter it. |
Control | Used to test the validity of the field. |
After-field | Carried out after the control if it is valid. Used to assign or to display other fields. |
After-modif | Carried out after the control if it is valid, but it is not triggered unless the field has been modified. |
Selection | Triggered by the F12 key. |
Button 1 | Triggered by the F9 key and reserved for the tunnels. |
Button 2 to 20 | The F4 key provides a list of contextual menus. |
Before_line | Only for scrolling on grids and used to do something whenever the line modification mode is started. |
After_line | Only for scrolling on grids and used to do something after each line entry. |
Click | Only for the icon fields. Used to trigger an action when clicking the icon. |
Indicates the actions to be carried out in a systematic manner on the type of data.
The actions STD, SPE, or SPV that are linked to a particular function will not be entered at this level.
Used to enter several actions for the same action type except for the "button", "icon", or "selection" actions. A title will be displayed just after entering the code.
This field is used to define the context of the action execution.
This section defines the properties and behaviors used in the version 7 client. It includes the following information:
Can be either Simple, Reference, or Rich Media:
This information refers to the content type dictionary, which defines a "mime type" associated with the data type. This is used by the communication protocol, and the codification follows the normalization rules.
internal type | mime type |
---|---|
Local menu | application/x-boolean |
Local menu | application/x-choice |
Uuid | application/x-string |
Datetime | application/x-datetime |
Shortint | application/x-integer |
Integer | application/x-integer |
Decimal | application/x-decimal |
Float | application/x-real |
Double | application/x-decimal |
Char | application/x-string |
Date | application/x-date |
Internal type | mime type examples |
---|---|
Clbfile | text/plain, text/tab-separated-values, text/html, text/rtf, text/css, text/xml |
Blbfile | image/jpeg, image/gif, application/msword, audio/midi, video/quicktime |
A content type can be defined as "specifiable". The only content types specifiable are ATYPE9
(BLOB) and ATYPE10
(CLOB). For these types, the mime type will be dynamically changeable. This will be done by using the method ASETATTRIBUTE
. The following example sets the mime type to application/msword:
ARET=Fmet This.ASETATTRIBUTE(This.MYCLOB,"$contentType","application/msword")
CLOB
or BLOB
type of field is slowly loaded. A separate http request feed is sent to get the data, and the "content-type" property of the http header is filled with the corresponding value, so the browser can select the most relevant widget to display the content.This check box can be input only for the rich media types.
Funprog
name. The corresponding Funprog must exist, and it can have as many parameters as needed. The first parameters are predefined and are mandatory as described in the next section. The return value is an integer status that is not null if any error occurs.This field is used to define dedicated formats for characters fields that carry automatic links. The choice can be:
This field is filled when the data type is a reference to another entity. This will automatically generate all the controls related to the referential integrity.
These three fields are used when the data type is a reference to another class. It allows you to define default representations that will be used when a zoom from the field to a detail facet or a query facet is present.
This grid defines a list of rules and methods:
The description of the rules and methods is given in the following table. Note that they are called as Funprog
and return an integer value that is not null if an error occurs. The first parameters are imposed and their name cannot be changed. They are called AINSTANCE
, APRONAME
, AFORMAT
, and AVALUE
.
Rule name | Description | Minimum parameter set expected |
---|---|---|
INIT | Called every time an initialization method is triggered on the instance. | The instance, the property name, and the value to be initialized must be defined: Variable Instance AINSTANCE Using OBJECT Value Char APRONAME() Variable AVALUE : # The type depends on the Property |
CONTROL | Called every time an update is done on the property. If an error appears, the property is not assigned and no other control is performed. Otherwise, the CONTROL rule associated with the property will be executed if it exists. | The instance, the property name, and the value to be controlled must be defined: Variable Instance AINSTANCE Using OBJECT Value Char APRONAME() Variable AVALUE : # The type depends on the Property |
PROPAGATE | Called every time an update has been done on the property. It allows to update other properties. The PROPAGATE rule associated with the property will be executed after, if it exists. | The instance, the property name, and the value of the property must be defined: Variable Instance AINSTANCE Using OBJECT Value Char APRONAME() Variable AVALUE : # The type depends on the Property |
GETVALUE | Called every time an access is done on the property. This can be especially useful if it slow loads the data. If the buffer is already filled, the value is directly returned; otherwise, a load is done from the database. The GETVALUE rule associated with the property will be executed after, if it exists. | The instance, the property name, and the value of the property must be defined: Variable Instance AINSTANCE Using OBJECT Value Char APRONAME() Variable AVALUE : # The type depends on the Property |
FORMAT | Called every time an assignment is done on the property before the CONTROL rule. This rule is dedicated to the control of the format conformity. | The instance, the property name, the value of the property, and the format must be defined: Variable Instance AINSTANCE Using OBJECT Value Char APRONAME() Variable AVALUE : # The type depends on the Property Variable Char AFORMAT() |
Rule name | Description | Minimum parameter set expected |
---|---|---|
AREAD_MEDIA | Performs the read operation (CRUD function on the class). | The instance, the property name, and the value of the property must be sent: Variable Instance AINSTANCE Using OBJECT Value Char APRONAME() Variable Clbfile AVALUE: # Depends on the Class |
UPDATE_MEDIA | Performs the update operation (CRUD function on the class). | The instance and the property name must be defined: Variable Instance AINSTANCE Using OBJECT Value Char APRONAME() |
INSERT_MEDIA | Performs the insert operation (CRUD function on the class). | The instance and the property name must be defined: Variable Instance AINSTANCE Using OBJECT Value Char APRONAME() |
DELETE_MEDIA | Performs the delete operation (CRUD function on the class). | The instance and the property name must be defined: Variable Instance AINSTANCE Using OBJECT Value Char APRONAME() |
READ_MEDIA_CNT | Returns the media type (useful when displaying the right icon on the browser without accessing the content). | The instance, the property name, and the media type must be defined: Variable Instance AINSTANCE Using OBJECT Value Char APRONAME() Variable Char AVALCNT() |
On this grid, the following information is entered:
Describes the type of event (see the table above). Several lines can exist for the same event and the corresponding code will be executed in sequence.
Defines the script in which the code corresponding to the event will be managed. The script might be generated in some cases and therefore will not be modifiable. For example, a control line is automatically added when a reference control on a class exists (the program control name is WMTYPxxxx, where xxxx is the data type).
Defines the name of the subprogram that will be called to handle the event.
Defines execution order when several lines exist for the same event.
Used to protect specific events or to disable them according to the activity code value.
Used to deactivate a standard event if set to No.
This grid displays the list of parameters as they are described in the Funprog
: the code, the data type, the class if relevant, the dimension and the mode used to transmit the parameter are displayed. The description can be changed. This parameter list will have to be filled when a property having this type is defined in a class or a representation.
Note that modifications done on the data type might have an impact on representations that have a link on a property having this data type.
This explains why entering in the dictionary on a representation can trigger an automatic update on the links. A message is displayed when this happens, and the user is invited to save the updated representation. The link on the representations is also automatically done when a patch is installed or the folder is revalidated.