Selection Criteria Concepts
For example, you want to find only those purchase orders for amounts under USD 10,000 that belong to Company 1. You can create selection criteria to find all the entries in the Requisition table that are associated with Company 1 and have a value of less than USD 10,000 in the Line Sum, Currency field.
Each set of selection criteria can contain multiple lines. On each line, you identify the table that contains the data, the field you are searching on, an operator such as "equal to" or "more than," and a target value. In the preceding example, one line would find all purchase orders under USD 10,000, and a second line would narrow the selection to purchase orders that belong to Company 1.
Note that when you set up selection criterion specifications, it is an advantage to have basic knowledge of database terminology.
A selection criterion specification consists of several criteria that are grouped together under a selection criterion specification number.
In the card part, you enter the number and name of the current criterion specification. In the Selection Criterion Specification Lines table, you select the criteria that different types of information must meet to match the selection criteria you have defined in the selection criterion specification. On each line you can indicate which table and which field should form the basis of the delimitation and select an operator, such as "equal to" or "more than," and a value that the operator should compare to, to see which entries in the table meet each criterion.
For example, you can specify that the criterion specification should obtain the entries in the Purchase Order table that have a value of less than USD 10,000 in the Line Sum, Currency field. This way, you create a selection criterion specification that obtains only purchase orders that amount to less than USD 10,000.
You can include multiple lines in a selection criterion specification.
For instance, you can define that the criterion specification should obtain purchase orders that have a value of more than USD 10,000 in the Line Sum, Currency field and are associated with a particular vendor. You can achieve this by adding the required number of lines, which must all be satisfied to meet the selection criterion specification.
Example 1
You want to create a selection criterion that obtains the purchase orders in Company 1 that amounts to less than USD 10,000. In the selection criterion specification, you should create these lines:
Outer Logical Op. | Table Section | Field Name | Inner Logical Op. | Operator | Value 1 |
---|---|---|---|---|---|
Purchase Order Header | Line Sum, Currency | Less Than | 10,000 | ||
Purchase Order Header | Company No. | Equal to | 1 |
All consecutive lines for which you have not specified an outer logical operator represent a group of criteria called a criterion series. A value must match the criteria for all lines within a criterion series to meet this criterion series. An expense sheet, purchase order, and so on, matches a selection criterion specification if it matches one or more criterion series in the selection criterion specification. The term "outer logical operator" is explained later in this introduction.
In this example, the two lines constitute a criterion series; a value must meet both criteria to match the criterion series and thus match the selection criterion specification.
You can create several criterion series in the same selection criterion specification. A purchase order, expense sheet, and so on, matches a selection criterion specification if it meets just one of the criterion series of the selection criterion specification.
You separate criterion series by using a line that contains the outer logical operator "Or."
Example 2
You want to create a selection criterion specification that obtains the purchase orders in Company 1 that amount to less than USD 10,000. The selection criterion specification should also obtain the purchase orders that relate to vendor number 31201918, regardless of the total amount of the purchase order, and to which company the purchase order relates. In the selection criterion specification, you should create these lines:
Outer Logical Op. | Table Section | Field Name | Inner Logical Op. | Operator | Value 1 |
---|---|---|---|---|---|
Purchase Order Header | Line Sum, Currency | Less Than | 10,000 | ||
Purchase Order Header | Company No. | Equal to | 1 | ||
Or | |||||
Purchase Order Header | Vendor No. | Equal to | 31201918 |
The first two lines represent a criterion series, and a value must meet both criteria of this series for a purchase order to match the criterion series. The last line is also a criterion series because the outer logical operator "Or" separates this line from the first criterion series.
A purchase order matches the selection criterion specification if it meets one or several of the criterion series of the selection criterion specification. Thus, a purchase order matches the selection criterion specification if it either relates to Company 1 and amounts to less than USD 10,000 or it is assigned to vendor number 31201918.
When you use the outer logical operator "Or," none of the criteria of the lines above the "Or" operator apply to those criterion series that are below the "Or" operator. It is therefore necessary to repeat the criteria that apply to the criteria on both sides of the "Or" operator. This requirement is illustrated in Example 3.
Example 3
You want to create a selection criterion specification that obtains the purchase orders in Company 1 that amount to less than USD 10,000. The criterion specification should also obtain the purchase orders that relate to vendor number 31201918, regardless of the total of the purchase order, but the company number should still be 1. In the selection criterion specification, you create these lines:
Outer Logical Op. | Table Section | Field Name | Inner Logical Op. | Operator | Value 1 |
---|---|---|---|---|---|
Purchase Order Header | Line Sum, Currency | Less Than | 10,000 | ||
Purchase Order Header | Company No. | Equal to | 1 | ||
Or | |||||
Purchase Order Header | Vendor No. | Equal to | 31201918 | ||
Purchase Order Header | Company No. | Equal to | 1 |
Note that Maconomy performs a delimitation twice on the company number because the first line that contains the company number delimitation only applies above the "Or" operator. If the last line that has company number delimitation had not been created in the selection criterion specification, this criterion specification would only obtain all purchase orders that have vendor number 31201918 regardless of company number, in addition to the purchase orders that meet the criteria in the first two lines.
You can specify as a criterion that a purchase order, expense sheet, and so on, should match another selection criterion specification to match the current selection criterion specification. You do this by creating a line that has the operator "Matches" and entering the number of the selection criterion specification in the Value 1 field. Using the operator "Does Not Match" you can specify that a purchase order, expense sheet, and so on, must not match a certain selection criterion specification to match the current selection criterion specification.
If you want to perform more delimitations on the same field within the same criterion series, you can use an inner logical operator. For example, you might want a criterion series to obtain all the purchase orders that relate to Company 1 and that also represent an amount of USD 10,000 or less.
If you do not use an inner logical operator, you would in this case need to create two criterion series of two lines each, that is, a criterion series that obtains purchase orders in Company 1 that amount to USD 10,000 and another series that obtains purchase orders in Company 1 that amount to less than USD 10,000.
By using an inner logical operator, you can, however, couple the two criteria that relate to the purchase order amount in the same criterion series. When you use an inner logical operator, you should not enter a value in the Table Section and Field Name fields because Maconomy uses the table section and the field name that apply to the previous line. You can create a selection criterion specification similar to the preceding scenario by entering these lines:
Outer Logical Op. | Table Section | Field Name | Inner Logical Op. | Operator | Value 1 |
---|---|---|---|---|---|
Purchase Order Header | Company No. | Equal to | 1 | ||
Purchase Order Header | Line Sum, Currency | Equal to | 10,000 | ||
Or | Less Than | 10,000 |
Because this uses no outer logical operator, all these lines are considered one criterion series. In line 3, the selection criterion specification includes the inner logical operator "Or," which means that the table section and field name on this line correspond to the ones on line 2. Because the lines belong to the same criterion series, this selection criterion specification obtains purchase orders in Company 1 that amount to USD 10,000 or less. The inner logical operator can be either "And" or "Or." Example 4 illustrates the function of the "And" operator.
Example 4
You want to create a selection criterion specification that obtains the jobs that belong to Company 1, and in which the words "urgent" and "support" form part of the texts that you entered for the job in the Job Descriptions workspace. In the selection criterion specification, you enter these lines:
Outer Logical Op. | Table Section | Field Name | Inner Logical Op. | Operator | Value 1 |
---|---|---|---|---|---|
Job | Company No. | Equal to | 1 | ||
Job Text Line | Text | Contains | urgent | ||
And | Contains | support |
In this case, the inner logical operator "And" means that the conditions in both lines 2 and 3 must be met for a job to match the selection criterion specification. This specification does not obtain jobs for which only one of the words is included in the job text lines.
You can create several consecutive lines with an inner logical operator. You use the "And" operator to link to the closest preceding line; however, "Or" does not link to any lines above. Examples 5 to 7 illustrate this functionality.
Example 5
You want to create a selection criterion specification that identifies the jobs for which the words "urgent" and "support" are included in the texts that you entered for the job in the Job Descriptions workspace. If the text lines do not include these two words, a job should still match the selection criterion specification if a text line for the job contains the word "priority." In the selection criterion specification, you create these lines:
Outer Logical Op. | Table Section | Field Name | Inner Logical Op. | Operator | Value 1 |
---|---|---|---|---|---|
Job Text Line | Text | Contains | urgent | ||
And | Contains | support | |||
Or | Contains | priority |
In this example, the "And" operator in line 2 means that line 2 links to line 1. The "Or" operator does not link to any of the lines above it. The result is that the conditions in lines 1 and 2 must either both be met, or the condition in line 3 must be met.
Example 6
The following selection criterion specification generates the same result as Example 5:
Outer Logical Op. | Table Section | Field Name | Inner Logical Op. | Operator | Value 1 |
---|---|---|---|---|---|
Job Text Line | Text | Contains | priority | ||
Or | Contains | urgent | |||
And | Contains | support |
In this example, the "And" operator in line 3 means that line 3 links to line 2. The "Or" operator in line 2 does not link to any of the lines above it. The result is that either the conditions in lines 2 and 3 must both be met, or the conditions in line 1 must be met.
Example 7
You want to create a selection criterion specification that obtains the jobs for which the words "urgent" and "support" are contained in the texts that you entered for the job in the Job Descriptions workspace. If the text lines do not contain these two words, a job should, however, match the selection criterion specification if a text line for the job contains either the word "priority" or the word "important." In the selection criterion specification, you enter these lines:
Outer Logical Op. | Table Section | Field Name | Inner Logical Op. | Operator | Value 1 |
---|---|---|---|---|---|
Job Text Line | Text | Contains | priority | ||
Or | Contains | important | |||
Or | Contains | urgent | |||
And | Contains | support |
In this example, the "And" operator on line 4 means that line 4 links to line 3. The "Or" operator on lines 2 and 3 does not link to any of the lines above it. The result is that either the conditions in lines 3 and 4 must both be met or the conditions in one of the lines 1 and 2 must be met.
A selection criterion specification type indicates what kind of information you can set up delimitation on in each selection criterion specification. Each selection criterion specification type identifies one or more database tables or database table sections whose fields are available for setting up selection criteria. At the same time, the selection criterion specification type of a given selection criterion specification determines the context in which you can use the criterion specification. There are two kinds of selection criterion specification type:
- Manually created selection criterion specification types - In this workspace, you can create your own selection criterion specification types manually. For each type, you can specify the database table where you want to set up selection criteria.
For example, if you specify the "NoteLine" table for a selection criterion specification type, the criteria defined for that type can be applied to the fields in that table. These manually created types are applicable in monitors where they dictate the criteria that entries in the specific database table must meet for a particular action to be executed.
- Predetermined selection criterion specification types - Maconomy comes with several predefined types that you cannot change. Each predefined type is designated for specific usage areas, restricting their application to those contexts exclusively. You can only utilize selection criterion specifications associated with a particular predefined type within designated workspaces. As each predefined type is fixed, certain tables and table sections relevant to its context are preassigned, enabling you to set up the criteria based on information contained within those tables.
You can use predefined selection criterion specifications in the following contexts. For information about the options that are available for the individual contexts, see the description of the Type field.
- Approval Hierarchy Selection - In connection with approval hierarchy selection, you use selection criterion specifications to determine the approval hierarchy to be used for the approval of each purchase order, expense sheet, or vendor invoice allocation line. You do this in the Approval Hierarchy Selection workspace, where you create several hierarchy lines, each of which contains its own selection criterion specification. On each line you also select the approval hierarchy to be used on purchase orders, expense sheets, or allocation lines that match the selection criterion specifications. This way you can, for example, ensure that purchase orders that are assigned to different companies are approved through company-specific approval routines.
Note that you must create separate approval hierarchy selections for purchase orders, expense sheets, and allocation lines, respectively. In approval hierarchy selections for purchase orders, you use selection criterion specifications of the Requisition type. You use the selection criterion specifications of the Expense Sheet type in the approval hierarchy selection for expense sheets. You use selection criterion specifications of the Vendor Invoice type in the approval hierarchy selection for vendor invoice allocation lines.
- Approval hierarchies - In connection with approval hierarchies, you use selection criterion specifications to decide who should approve each purchase order, expense sheet, or vendor invoice allocation line. You select the hierarchy to be used for the approval of each entry in the Approval Hierarchy Selection workspace, as described previously. You define each approval hierarchy by creating several hierarchy lines, each of which has its own selection criterion specification, and a person who approves purchase orders/expense sheets/allocation lines that match the selection criterion specification. This way you can, for example, ensure that if a purchase order does not amount to more than a certain amount, it should only be approved by the person who submits the purchase order, whereas purchase orders for larger amounts should also be approved by the supervisor of the person who submits the purchase order.
Note that you should create separate approval hierarchies for purchase orders, expense sheets, and allocation lines, respectively. In approval hierarchies for purchase orders, you use selection criterion specifications of the Requisition type.
You use selection criterion specifications of the Expense Sheet type in the approval hierarchies for expense sheets. You use selection criterion specifications of the Vendor Invoice type in the approval hierarchies for vendor invoice allocation lines.
- Campaigns - In connection with campaigns, you use selection criterion specifications to determine which contact companies and contact persons should be included in each campaign.
- Job Searches - In connection with job searches, you use selection criterion specifications to find certain jobs in the Job Search workspace. In the Job Search workspace, you can switch between existing selection criterion specifications of this type; the subtab displays the jobs that match the current selection criterion specification. This enables you to easily find jobs with, for example, a certain job processing status or jobs for which you are the project manager.
- Approval Hierarchy Selection - In connection with approval hierarchy selection, you use selection criterion specifications to determine the approval hierarchy to be used for the approval of each purchase order, expense sheet, or vendor invoice allocation line. You do this in the Approval Hierarchy Selection workspace, where you create several hierarchy lines, each of which contains its own selection criterion specification. On each line you also select the approval hierarchy to be used on purchase orders, expense sheets, or allocation lines that match the selection criterion specifications. This way you can, for example, ensure that purchase orders that are assigned to different companies are approved through company-specific approval routines.