Entity Types

Types ar sub-objects of an entity. They make it possible to extend the master attributes of the entity by additional attributes. Additional attributes are special features for sub-sets of master elements. A type can be created for each of these sub-sets. This is characterized by a set of additional attributes and mapped in an own type table. Types should always be created if the data managed in the master table also have several additional attributes and the mapping of all attributes in only one master table resulted in too many empty entries in the master table. Additionally, creating types allows you to dynamically extend the set of master attributes if new features have to be managed that were unknown when the original data model was created and you cannot change the entity definitions.

Each type in the database is represented as a type table in the DataView format. That table contains the type-specific additional attribute fields and the DataView-internal system fields. Every type record entered is unambiguously identified by the C_ID automatically assigned by DataView. The relation between type record and master data record is created in the master table of the entity using an additional internal Ident number C_ID_2. This means that types can only be created for entities which are mapped in DataView tables/views.

You can first display the additional attributes managed in the type table in a default type list or in a default type form on the desktop. Both masks show the first master attribute field of the master table (significant field) and the type-specific additional attribute fields of the type table, that is fields of two database tables. In type masks the user can create a type relation by selecting an untyped master record in the modal window at the master attribute field and subsequently assigning the type-specific additional attributes. Additionally, the entire standard functionality is available, which is required to search, to modify, to display dependent elements announce, etc.

Example: In the meditronic application endoscopes and instruments are two sub-sets of the Item set, which can be mapped as types in the item entity. In addition to the commonly used master attributes number, identifier and price, the following type-specific attributes have been defined:

The figure shows the management of the of the type-specific attributes in the two type tables and the 1:1 relations between master records and type records. The type-specific display of endoscopes and instruments on the desktop is possible via the default type list/form (here default type list only).

How to Create a Type Instance for the Entity:

  1. Open the Entity Data form and load the entity for which you want to create one (or several) type instances into the header form.

    Make sure that the entity is not mapped as foreign format table or as foreign view.

  2. Change into the Type Relation sub-list and enter a new type record.

    Field Comment Confer
    Type Name Here you enter the type name. -
    Table Here you enter the name of the type table to be created. -
    List
    Form
    Here you enter the names of the default type masks to be created (this is optional, specification of list is recommended). -
    > Ch (check value) Here you set at what number of related type records parent records can still be deleted. If possible, use the default setting offered. -> Check for Dependent Elements
    Title The object title is used in error messages and is required for selecting the main entity in the dynamic query mask.

    After saving the data of the type object are stored in the repository, but still without the corresponding table fields.

  3. Change into the Entity Type form via the hyperlink in the Table column. The type record is displayed in the header form.

  4. Change into the Table Fields sub-list and enter a new field record for each desired type-specific additional attribute field.

    Please note the following comments when entering database-relevant field attributes:

    Field Comment Confer
    Field Name Here you enter the field name in the syntax TABLENAME.COLUMNNAME. The entry is supported by automatically providing the default TABLENAME. For COLUMNNAME C_NAME is recommended. -> Table Fields
    Sequence Here you specify the position number of the field. This determines the field sequence in the type table and in the default masks. -> Sequence of Fields in Tables
    Type Here you select field data type. When leaving the field the default length will be automatically added. It can be changed. -> Field Types
    Index 1-3
    Uniqueness 1-3
    Non-Zero Flag
    As a rule, you do not index any fields in type tables, you set no uniqueness flag and no non-zero flag, unless you want to create links from or to type tables and need key fields to do so. -> Indexed Fields
    -> Unique Fields
    -> Non-Zero Fileds
    Multilinguality Here you select the languages for which the field in the table is to be created as multi-lingual. -> Multilingual Table Fields
    Mode Here you select the field-specific case-sensitivity for queries. -> Field-Specific Query Mode

    The following field attributes are optional. Specification is important if the fields are to be used in masks. They are evaluated when default type masks are created. You can mask-specifically overwrite these attributes when you refine the mask design later:

    Field Comment Confer
    Field Title Here you can enter a field title. It appears as column title in lists and as field title in forms. -> Field Title
    Description Here you can enter a help text for the field. When the field is edited, it will appear in the mask footer. -> Description for Fields
    Check String Here you can enter a character string to check the syntax of field entries. -> Check Strings for Field Entries
    Default Entry Here you specify the default value of the field. -> Assigning Default Values to Fields

    After saving the data of the type object are completely stored in the repository. All created type table fields can be viewed in the Field Data form.

  5. Change into the Entity Type header form and create the type table using Create Table.

    After that the type table will exist in the database.

  6. Create the Default Type list or the Default Type form via Create List or Create Form (Creating the list is recommended).

    After that the data of the default type masks are stored in the repository and copied into main memory. The default masks and their corresponding mask-field relations can be viewed in the Mask Data form.

    Note! A created default type list cannot be immediately opened via the manager menu in the same way like a default master list. For testing type lists on the user interface you should create a temporary item in a pull-down menu executing the standard userexit iwf_lis_type. As parameter you must at least pass the entity name selected in 1. Then you can use the item to open created default type list for the entity (in case of several type instances a selection menu will automatically appear). By entering test data you check the type objects and the additional attribute fields have been correctly created. You should create at least one type relation by entering a new type record, selecting an untyped master record in the modal window and assigning the additional attributes. If at least one type relation exists, you can also open the type form (if created) via -> type forms in the Select menu of the default master masks.