How 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
An Expression folder calculates the content of the folder based on a OCL expression . You can create filter folders that always show only the entries that match the criteria. An example of an Expressionfolder would be the display of all users who worked overtime, the division of addresses by state, etc.
Right-click the folder in which you want to create the Expression folder and click New > Expression folder
. The Properties window appears where you can specify:
Designation | Under this name, the folder is displayed in the tree. |
Expression | Here you can find a OCL expression You can either type them in by hand or use the OCL expression Editor put together. |
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 is 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, you can show a separate list for each type, see Folder contents with separate list for each type. |
Starting with Vertec 6.2, queries can be defined for Expression folders and the parameters entered can be used in the folder expression and in the column expressions.
It is not necessary to define queries for the Expression folder to work, it is also sufficient 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 Define queries...
opens the dialog for creating queries.
The field names are applied as variable names as in the SQL folders, preceded by var. 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 expressions of the list settings:
project editor->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 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 Immediate Search
option in the query dialog. This allows the search to be executed immediately when the folder with the default search parameters (e.g. the logged-in user) is displayed, without having to click on Search
.
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 Remove All Remove
button in the query dialog, and the Expression folder behaves like a “regular” Expression folder again.
For Expression folders with query, a class name is also shown in 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, it may take some time to display such an Expession folder.