Calculated object class properties are defined with a query which generates a property value automatically. The query is executed whenever a user accesses a view displaying the calculated property. From a user perspective, calculated properties are handled identical to any ReadOnly object class property. They can be displayed in graphics, data workbenches and content areas to inform the user about important data about the objects of an object class.

The functionality provided by calculated properties is similar to the one provided by calculated indicators. Calculated properties offer additional advantages. They can be used to calculate values which are not related to evaluation and can return a date or a string. In addition, they provide reliable display of up-to-date values without users having to trigger update via a button interaction. Indicators shall be used instead of calculated object class properties if the use case is evaluation or if the query required to calculate the result is complex. Only simple queries can be defined for calculated object class properties for performance reasons.

Technically, the definition of a calculated property defines a database view which is updated with current values at runtime. The name of the database view is identical to the value of the Tech Name Default attribute of the calculated property. The database view consists of the two columns: , and VALUE.

  • The REFSTR column the value of the REFSTR object class property of the object the value is calculated for.
  • The VALUE column stores the calculated value.

Calculated object class properties cannot be included in Alfabet query language. You can read them via SQL queries. To return the name of the current object and the value of the calculated property for the object a user is currently working with, you can define a query like the following:

  • SELECT object.name, calcprop.VALUE
  • FROM ObjectClassTechName object
  • INNER JOIN CalculatedPropertyTechNameDefault calcprop ON calcprop.REFSTR = object.REFSTR
  • WHERE object.REFSTR = @BASE
  1. In Alfabet Expand, go to the Meta-Model tab.
  2. Expand the node of the object class.
  3. Right-click the Calculated Properties node and select Create New Calculated Property.
  4. Define the technical name of the object class property in the Property Name field. Click in the Partial Technical Name field to define the part of the database view name which is variable. The name of the database view is:

    NameOfObjectClass_PartialTechnicalName

  5. Click OK.
  6. Set the attributes: