Query folder

Using Query 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
Updated: 22.07.2024 | SQL folder in Queryfolder possible from version 6.6.0.3.

In a Query folder, different folders and OCL expressions can be combined with each other. To create a Query folder, right-click on the folder in which you want to create the Query folder and select New > Query folder. In the folder dialog that appears, click on the button Define Queries.... The following query editor appears:

Click the New button to create a new row in the query Source list. Select this row and select the desired folder in the folder field. In the Operator field, select how to handle the data. The following options are available:

AttachmentAll entries of the specified folder are applied into the query.
intersectionThe entries in this folder are intersected with the entries that exist from the previous rows. That is, only the entries that are contained in all the queried folders are used.
ExcludeEntries that are in this folder will be removed from the result, so only entries that are not in this folder will be included in the result.
Expression

Based on the current intermediate result, an OCL expression can be specified. Select Expression as the operator. Click on the button with the three dots will bring up the OCL expression Editor.

The following rules apply:

  • The input of the expression is always based on the type of the current intermediate result. Here in the example is the address.
  • The determination of the type (class) of the result is based on the content of the folders used. It is done for the different operators as follows:

    Add: common base class of the two folder types

    Intersection: Type of first folder

    Exclude: Type of first folder

    Expression: Type of the result of the expression

    Intermediate results via Expressions can have any type of results (does not have to be a list of Userentries). However, in the end, the result should be a list or a single User Entry.

The different queries are always considered in order. A Query folder can also exist in another Query folder.

In versions prior to 6.6.0.3, do not use SQL folders in Queryfolder because they do not update automatically when changes are made. This may lead to incorrect results.

Example shown

  1. The first folder is Potential customers, followed by the Add operator. This means that after this step all addresses from Potential customers are included in the current Queryfolder.
  2. Next, the Event Invites folder is added with the Exclude operator. After this step, all potential customers who have never received an event invitation are in the current Queryfolder.
  3. As the last folder, the Zurich branch is selected with the operator intersection. An intersection of the previous two folders and the newly created folder is formed. The Queryfolder now contains all potential customers from the Zurich area who have never received an event invitation.
  4. With the OCL expression, only those addresses that have set the language to German are taken from all these addresses.
Bitte wählen Sie Ihren Standort