Expression folder

To work with Expression folders

Product line

Standard

|

Expert

Operating mode

CLOUD ABO

|

ON-PREMISES

Modules

Services & CRM

Budget & Phases

Purchases

Resource Planning

Business Intelligence

Created: 20.06.2003
Machine translated
Updated: 10.10.2024 | Screenshots updated.

An expression folder calculates the contents of the folder based on an Ocl expression . This allows you to create filter folders that always show only the entries that match the criteria. An example of an expression folder would be the display of all users who worked overtime, the breakdown of addresses by state, etc.

Right-click on the folder where you want to create the Expression folder and click Neu > Expression-Ordner. The Properties window appears where you can specify:

Designation Under this name, the folder is displayed in the tree.
Expression Here you can enter an Ocl expression . You can either type it in by hand or compile it using the Ocl expression editor .
New Class If you want to create new objects in this folder, you can specify the type of these objects here.
Index The index allows you to specify the sorting in the tree. Vertec simply sorts the folders by ascending index. If nothing is specified, the folders are sorted alphabetically.
Icon (disambiguation)

All icons in Vertec are assigned a number. If you want to use a different icon for this folder than the default icon (-1), you can enter the index of the desired icon here. The corresponding numbers can be found in the Icons article.

An Expression folder can be recognized at a glance by the fact that it has a gear in the default icon.

Separate list for each type: If the folder contains entries of different types, a separate list for each type can be shown, see Folder contents with separate list for each type.

Define queries

Starting with Vertec 6.2, queries can be defined for expression folders and the parameters entered can be used in the folder expression as well as in the column expressions.

You do not have to define queries for the Expression folder to work, it is also enough to specify only one expression. However, if you want to be able to pass certain search parameters, which are queried by the user, you can define queries.

The button Abfragen definieren… opens the dialog for creating the queries.

The field names are applied as variable names as with the SQL folders , preceded by var. When forming the variable name based on the field name, only letters and numbers from the ASCII range are taken into account. All other symbols (e.g. spaces, hyphens, umlauts, etc.) are filtered out and are not taken into account for the variable name.

In the example above, there is a variable varteamleiterkrzel from this field, which can be used in the OCL expression as well as in the column expression of the list settings:

projektbearbeiter->select(teamleiter.kuerzel=varteamleiterkrzel)

The OCL Expression Editor knows these variable names and displays the expression as valid.

As with the SQL folder, several search fields can be defined. These are created with the + in the query dialog.

Individual query fields can be removed with the button.

As soon as you click on OK in the query dialog, the query is created and the corresponding field is shown on the interface:

The folder search can also be executed immediately by activating the Sofort Suche in the query dialog. This way, the search is executed immediately when the folder with the default search parameters (e.g. the logged-in user) is displayed, without having to click on Suchen.

Further searches can be carried out as usual by changing the search parameters and using the search button.

The entire query is deleted by clicking the Alle entfernen button in the query dialog, and the expression folder again behaves like a “regular” expression folder.

For Expression folders with query, a class name is also shown on the properties dialog:

For expression folders without a query, this field is hidden because it is not needed because the class results from the expression itself.

The contents of Expression folders are calculated at the time of display, so the displayed data always corresponds to the current state. For large amounts of data, the display of such an Expession folder may take some time.