Skip to content

Views File

The views file (*.views) contains all views defined by the entity and the view properties and attribute properties. These files are not directly deployable into the database and have to pass through the code generator which produces database deployable apv files. Views files can be empty if no additions or changes to the template generated base views exist.

Base views files

In the Base views files the following are defined:

  • Column definitions for all attributes in all the model files
  • Base view definition

The only view that exists in the base views file is the Base View. The properties set on the base view comes from the entity model. You are not supposed to change anything in the base view file, it should be completely generated. 

COLUMN Object_Group_Id IS
   Flags = 'KMI--'
   Datatype = 'STRING(30)/UPPERCASE'
   Prompt = 'Object Group Id';
COLUMN Description IS
   Flags = 'AMIUL'
   Datatype = 'STRING(200)'
   Prompt = 'Description'
COLUMN Queue_Id IS
   Flags = 'AMIUL'
   Datatype = 'NUMBER'
   Prompt = 'Queue ID'

Core views files

In core views files you can:

       
  • Add new views 
  •    
  • Override the base view
  •    
  • Overtake the base view
 
   VIEW Dictionary_Sys_Domain IS    Service = 'Dictionary'    Prompt = 'Domain values in Logical Unit Dictionary'    Lu_Name.Flags = 'PM--L'    Lu_Name.Datatype = 'STRING(30)'    Lu_Name.Prompt = 'Logical Unit Name'    Package_Name.Flags = 'PM--L'    Package_Name.Datatype = 'STRING(30)'    Package_Name.Prompt = 'Package Name'    Db_Value.Flags = 'KM--L'    Db_Value.Datatype = 'STRING(60)'    Db_Value.Prompt = 'Database Value'    Client_Value.Flags = 'AM--L'    Client_Value.Datatype = 'STRING(120)'    Client_Value.Prompt = 'Client Value' SELECT lu_name                        lu_name,        package_name                   package_name,        db_value                       db_value,        client_value                   client_value,        rowid                          objid FROM   dictionary_sys_domain_tab;

[Customization views file](customization_views_file)

In customization views files you can:

  • Add new views
  • Override all the views from Core and Base layer
  • Overtake all the views from Core and Base layer
## View properties View properties can be added or changed in the beginning of the View definition clause. Example of properties to change are:
  • Prompt
  • Objversion
Example of adding view properties:
VIEW Person_Info IS    Prompt     = 'Person Info'    Objversion = 'to_char(rowversion)'

Attribute properties

Adding view attribute properties is done by adding these in the beginning of the view definition. You must prefix the property with your attribute name, view properties are not prefixed.Below is an example of adding attribute properties on a new view: ## Column properties versus View attribute properties The difference between COLUMN properties versus VIEW attribute properties is that the COLUMN properties are valid for all views and VIEWS attribute properties are only valid for that view. If you have many views with the same column name it is easier to use COLUMN properties instead and only define them once for all views. You do not need to specify the COLUMN or VIEW attribute properties if they are the same as in the model, only when you have a difference. ### Syntax COLUMN

COLUMN Object_Group_Id IS    Flags = 'KMI--'    Datatype = 'STRING(30)/UPPERCASE'    Prompt = 'Object Group Id';
### Syntax View Attribute
VIEW Overtake_View_LOV IS    Description.Datatype = 'STRING(200)'    Description.Prompt = 'Name of Overtaken views'    Description.Flags = 'A----'
## Types of properties The following types of properties exist: ### Flags The flags describes the attribute properties. The flags to use are the same as the flags on an attribute, see [attribute flags](../../010_model/020_entities/050_attributes/index.md#attribute-flags). ### Datatype The data type describes if the attribute is number, date, string, Boolean etc. Some of the data types can have a format, the format is usually optional. The property data type to use is the same as the data type on an attribute, see [data type](../../010_model/020_entities/050_attributes/index.md#data-type). Observe that TEXT should be STRING in the views file. ### Enumeration The enumeration is used when an attribute has list of values that should be used. You specify yourself which enumeration to be used. ### Prompt The prompt is used to define another name of the attribute to be displayed. ### Ref The ref is used when an attribute has a reference from an other attribute in an other entity. You specify yourself which reference to be used. ### Examples
VIEW Xlr_Wb_Collection_Pub IS    Process_Status.Flags = 'AMIU-'    Process_Status.Datatype = 'STRING(200)'    Process_Status.Enumeration = 'XlrWriteBackStatus'    Process_Status.Prompt = 'Process Status'    Process_Status.Ref = 'XlrWriteBackStatus'