1. Class and query columns

    Article: AN0001604 Updated: 03.12.2018 Displayed: 595x

    Each class or query contains columns with data. Data are physically stored in class columns. Query columns represent only data display.

    There are couple of differences between class and query columns - see following table.

      Class  columns Query columns
    Column creation

    Each class has couple of system columns that are created automatically.

    Further columns can be added, change or modified.

    Columns can be defined by means of SQL query only.
    Column configuration Most settings can be configured after column creation. Columns can be configured after creation in a limited way, mostly display properties.
    Column types All column types can be used. Some column types cannot be used in query, e.g. Files, Reference to a class.

    System columns

    When creating a class system columns are created at the same time. These columns are used for data identification in references and determination of data source for audit. Queries do not have any system columns.

    Following table shows overview of system columns. 

    Column code Description
    id Record ID
    shortdescription Record short description
    creator Account of user, that created the record
    created Date of record creation
    modifier Account of user, that created the record last time
    modified Date of record last change
    deleter Account of user, that deleted the record
    deleted Date of record deletion
    createddatasourceid Id of the data source of record creation
    modifieddatasourceid Id of the data source of record last change
    deleteddatasourceid Id of the data source of record deletion

    Values of system columns are determined by ObjectGears system and cannot be changed neither by script.

    The only exception is column ShortDescription, whose value is defined based on property Description format, that is defined by a user in class detail. Value in this column represents the whole record and is used for display in references to another class.


    The system columns are not display in the list of records by default. If you want to display them, you have to explicitly set property Display in list for each of these columns.

    Audit columns are displayed in the section Audit trail of the record detail.

    This section is packed by default. In order to display it you have to click on its name.

    There is value from column ID displayed in the page title.

    System columns are not displayed in the list of columns by default. In order to display them check off the option Display without system column.

    Example: Display without system columns.

    Example: Display without system columns.

    Column types

    ObjectGears system supports several basic column types, that can be used in class or query. You work with the column also in a script (read/write) by means of methods of the object OG.DataRow. You can find a complete overview of methods in the documentation of this object. The table shown hereinafter contains only main methods for reading from/writing to columns.

    Type Main methods for work with column in a script
    Text GetText/SetText
    Integer GetInteger/SetInteger
    Decimal GetDouble/SetDouble
    Indication True/Untrue GetBoolean/SetBoolean
    Date GetDateTime/SetDateTime
    Guid GetGuid/SetGuid
    Files N/A
    Picture GetServerImage/SetServerImage
    Colour GetColor/SetColor
    Reference to a class GetClassDef/SetClassDef
    Value from a referenced class GetClassLink/SetClassLink, GetPerson/SetPerson, GetMultiClassLink/SetMultiClassLink, GetMultiPerson/SetMultiPerson
    Číselníková hodnota (odkaz na více tříd) GetXClassLink/SetXClassLink, GetXMultiClassLink/SetMultiXClassLink

    The page for inserting a new column enables a mass creation of predefined columns. These columns are based on basic columns and are already configured for a particular purpose. Use of predefined columns saves time at class creation. These columns can be changed after creation in any way. Example of these columns are Name, Order, Email... There are also column used with class for storing tasks in workflow.

    Column properties

    Columns have number of properties that depend on column type. You can find general properties valid for each column in the following table. Other properties are described at particular column type.

    Name Decription
    Class/Query Defines to which class or query the column belongs to.
    Id Unique internal column identifier. It is generated automatically.
    Code Column code. It is unique within the given class/query.
    Name Column name. The column is displayed under this name in forms. It is a localized attribute (various values for various languages).
    Description Column description. This text is displayed in the record detail ina small script under the column name. It is a localized attribute (various values for various languages).
    Column type Column type.
    Mandatory Indication, wheather the column is mandatory and has to be filled in a detailed form.
    Help text Text of the column help, that is displayed after moving a mouse on question mark icon in the detailed form. It is a localized attribute (various values for various languages).
    Enable editing by record creation Indication, wheather the column can be filled in in a detailed form at new record creation.
    Enable editing by record change Indication, wheather the column can be filled in in a detailed form at record change.
    Column in DB Columns stored directly in a table display here name of the column in the database.


    Formulas are applied on columns even if they do not have set Enable editing.... Value calculated by a formula in the column detail or by a rule (script etc.) of a class is always stored without taking indication Enable editing... in account.

    Display over the whole row

    Columns are displayed in two columns in a form by default. However, it is suitable to display some column over the whole form width. There are three values available - see the picture hereinafter:

    Column ordering

    Column order in the list of in the record detail is defined on page Form appearance setup.

    Summary information

    Sum column types (date, integer or decimal) enable to display a summary information (min, max, sum, avg) in the list of recorsd. These summary data are calculated from all the filtered records regardless paging. Ths means that if you filtered 100 records but only set of first 20 records is displayed, summary information is calculated for all the 100 records.

    You can define Display format of the Sum row in the column definition. If the input format is erroneous, question mark ? will be displayed in the summary row for the column.

  2.    ---
    Your rating:
    Rated by users: 0x
  3. Top