Refer to documentation Implementation
The definition of a view is done using three tabs: a query definition tab, the field definition tab and the key definition tab.
Fields
The following fields are present on this tab :
| The view code must be composed of 1 to 10 characters (letters or numbers but must start with a letter). It is the unique identifier for all the views of the data dictionary. A view cannot carry the same name as a table in the dictionary, the the validation, the supervisor generates the files*.srf et *.fde. the words reserved for Adonix are prohibits. |
| The view abbreviation must be composed of 1 to 3 characters (letters or numbers but must start with a letter). This indicator need not be unique for all the abbreviation of the views in the data dictionary. The Adonix reserved words are prohibited. |
| Enter the description of the relevant record. This long description is used as a title in screens and reports. |
|   |
Close
Presentation
This tab is used to write the query.
The query must be written at least in the language of the current folder database. But for any standard view supplied, a script is delivered for each base. The *.viw file is created upon view validation with the script adapted to the database of the current folder, the latter being created in the FIL directory, on the data server.
Using a formula is recommended if fields submitted to an activity code, or a folder name, need to be specified in the query. Indeed, it is better not to "hardcode" the folder in the query, so as to enable operation in another folder following a copying of this view to another view.
For instance, activity code sized from 1 to 3 for the LIEN field, and formula on folder:
Select CLENUM1_0, CLENUM2_0, LIEN_0
%string$(find(func AFNC.ACTIV("ZZM"),2,3)<>0,", LIEN_1")%
%string$(find(func AFNC.ACTIV("ZZM"),3)<>0,", LIEN_2")%
From %nomap+"."%ZZMB
For further details on the query writing rules, please refer to the field help.
Close
Fields
The following fields are present on this tab :
Characteristics
| The Activity Code and the Module that are used to identify if the view described in the dictionary must be created in the database of the folder. It is if the two conditions set out below are achieved simultaneously : the activity code field is empty or that the activity code (defined in the corresponding view) is actually activated. the module to which the view is attached has been declared active for the folder. A view with an assigned activity code starting with X, Y, or Z, is considered to be specific/custom and in no case affected by a version change (these activity codes can be placed at the line level). |
| This check box is used to restrict the access to the data table within the folder owning the table and certain authorized folders. This notion is identical for the view. A modification of this field requires a revalidation of the table, to be taken into account in the database.
The authorized folders are :
It should be noted that this check box is not updated by patch : the security strategy for the table being considered as parameterization. On the validation of the table, the fact that this check box is checked provokes the creation of a configuration file (extension .cfg) with the following code :
If other manual directives exist in the configuration file, they are of course respected. The directives can be in effect added by update of the Configuration file section in the corresponding tab of the table management). |
| The Activity Code and the Module that are used to identify if the view described in the dictionary must be created in the database of the folder. It is if the two conditions set out below are achieved simultaneously : the activity code field is empty or that the activity code (defined in the corresponding view) is actually activated. the module to which the view is attached has been declared active for the folder. A view with an assigned activity code starting with X, Y, or Z, is considered to be specific/custom and in no case affected by a version change (these activity codes can be placed at the line level). |
|   |
Grid Tables and views used
|   |
|   |
Oracle
|   |
SQL server
|   |
Close
Presentation
This tab is used to define all the fields of the view in a drop-down menu. The description of the fields must be fully compatible between the query and this tab (number, order and field type). This check is performed upon view validation. These fields can exist in the table dictionary, although it is not mandatory.
Fields
The following fields are present on this tab :
Grid Fields
| In this column the field name for the view is defined as it will be expressed in the software (a field with the name FIELDNAME defined in an ABV abbreviation view can be accessed using the syntax [F:ABV]FIELDNAME ). For custom/specific fields, the field name must start with X_, Y_ or Z_. For a dimensioned field (FIELDNAME_0, FIELDNAME_1, FIELDNAME_2…), only a single field FIELDNAME is defined. |
| The field type is defined here. The principal types are : A : Alphanumeric It is not possible to use here, the data types related to the translated texts: AX1, AX2, AX3. |
| Defines the local menu number associated with the field defined on the line. When a field is of the type local menu (from 1 to 255) corresponding to the rank of a title in a table named local menu, stored in the messages table APLSTD. On entry or on display, the following are displayed according to the choices made in the user interface :
The interest of this type of entry is that the list of choices is displayed in the user connection language. Each local menu number characterises the list of available titles. For example, the local menu 1 corresponds to the choice No / Yes in this order. In this particular case, the user interface can also be a check box. |
| Used to define the length of a field when this field uses a generic data type where the length is not fixed. This is notably the case for the types A and DCB. |
| An activity code is used to:
If the activity code is disabled:
|
| Dimension of the field in the view. The dimension can also be assigned as a function of the activity code. |
| Enter the description of the relevant record. This long description is used as a title in screens and reports. |
| These options are realized by characters that can be concatenated when several options are required. It is possible to choose these options thanks to a selection window. A detailed description for all the possible options is available. |
Action icon
Presentation
This tab is used to define all the available keys for an 'order by' on the view. Caution: There is no index creation for the view.
Close
Fields
The following fields are present on this tab :
Grid Keys
|   |
| This field corresponds to the name under which the key is known in the order Order By. A standard is used in all the views in the application : it consists of naming the keys by using the abbreviation for the view, followed by 0 for the principal key, by 1 for the second key, etc.... For the specific/customization, start this code with one of the following three letters : X,Y or Z. |
| A list of fields that make up the index is entered here, separated by a "+" if there are several fields. |
| The default value of this field is set to Yes. It is possible to set it to No. In this case, a warning message is displayed informing that there should not be two identical keys on the index of this view. If it happened, no failure would occur but homonyms could not be detected by a simple For loop. It is then advised to let it set to "Yes" except in specific cases where the option "No" is used to support the instructions "Read Next/Prev" on views. |
| An activity code is used to:
If the activity code is disabled:
|
Configuration file
| A text describing the technical configuration of the view in the database is entered in this section. This text is recorded in a file "view_name.cfg" in the FIL directory for the application. This file is used by the "valfil" instruction. View the dedicated technical annex for more information. |
Close
The following fields are included on the window opened through this button : Block number 1
Block number 2
Close This button is used to copy the view structure to another folder. Caution: Only the description of the view in the dictionary is recopied: the view is not created in the target folder (it will be necessary to validate this description so that the view can be created). |
This is used to view the *.srf file corresponding to the current table in the current application.
This option is notably interesting when on a server with no rights to the FIL directory.
This is used to view the *.viw file containing the source of the view in the current application.
This option is notably interesting when on a server with no rights to the FIL directory.
In addition to the generic error messages, the following messages can appear during the entry :
It is not possible to create a view whose name is already given to a table. In effect, the names must be unique, all tables and view considered, because the system creates a *.srf and *.fde file.
Size of the configuration file limited.
it is not possible to create a view with an AXX type field (translatable text).
the length is incorrect based on the field internal type.
An attempt has been made to enter a non-existing option.
When a format is specified for an alpha data type, options A and # must not be used.
warning message, when an attempt is made to enter an abbreviation on a view that already exists for another view or table. It is indeed recommended to have single abbreviations.
A view is created in the database instance of the folder where it is installed upon validation. All the X3 functions used in such a view (with the %formula% syntax) are evaluated upon validation and transmitted to the base as constants.
When a folder is created or validated, the operation of view validation is triggered from the X3 folder, which is different from the folder where the view is installed. It is therefore necessary to take the following precautions:
If these precautions cannot be followed out, it is absolutely essential that the views be revalidated manually in the folders themselves after the end of the folder validation operations.