OCL expression editor

How the OCL expression editor works

Operating mode

Cloud Suite

|

ON-PREMISES

Modules

Services & CRM

Budget & Phases

Purchases

Resource Planning

Business Intelligence

Created: 20.06.2003
Updated: 08.05.2025 | Info about new model language field and new screenshots with version 6.8

The OCL expression editor helps you enter OCL expressions in Vertec. You can use it to search and create the desired expression from the Vertec data model.

Base

The base type is specified. The OCL expression refers to this type, in the example above it is Project.

Model language

The OCL expressions are available in both English and German as of version 6.8. The two languages can also be mixed.  

To use the code completion support (see below) in both languages, you can switch the OCL editor ad hoc here. This does not change the current model language. Instead, it shows the data model in the OCL editor in the other language for easier input.

Expression

In this area, you can edit the OCL expression, either by typing it manually or by double-clicking on the desired field on the right.

Available fields
Specifies the links, members and operations available on the current type.
  • green: all links to other objects
  • turquoise: fields (members)
  • yellow: operations

In the area below the expression, the expression editor indicates whether the expression is valid or not.

Example

In a list of projects, you want to show the project manager's total open services for each project. Go to List settings and open the expression editor by clicking on the button with the three dots.

Enter projectmanager in the Expression box (1). The editor reports that the expression is OK (2) and that the current type is now User. In the right pane, the fields of the user appear, including openServices. Select this in the list by double-clicking (3) or type it in manually.

When editing OCL expressions, a field description (English only) is shown below the available fields (4). This description is also shown as a tooltip (5) when manually entered. The code completion appears in the selected language.

The editor reports that the current type is a list of open services and shows the field type OpenService on the right.

Next you can select the feeExt field from the list or type in .feeExt after the existing expression so that the expression reads: projectmanager.openServices.feeExt. The OCL editor now shows the following:

The current type is now a list of numeric values (currency). In the right panel, only yellow entries (operations) are visible. Select ->sum to sum the numbers.

The current type is now a single numeric value, namely the sum of all the project manager's open services. If you click on OK, the created expression will be applied and shown in the relevant list cell.

Netherlands

United Kingdom