Selection Criterion Specification Single Dialogs Workspace
Use this workspace to set up sets of selection criteria, or queries, that you can use to locate records in the Maconomy database.
For example, assume that you want a monitor 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 of 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 Total, Currency field.
For example, assume that you want a monitor 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 of 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 Total, Currency field."
Each set of selection criteria can contain multiple lines. On each line, you identify the table that contains the data, the field that 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 a basic knowledge of database terminology.
A selection criterion specification consists of a number of criteria that are grouped under a selection criterion specification number. In the Selection Criterion Specification tab you enter the number and name of the current criterion specification. In the Selection Criterion Specification Lines sub-tab you select the criteria that different types of information must meet to match the selection criteria that you define in the selection criterion specification. On each line you can indicate which table and which field in that table in Maconomy's database should form the basis of the delimitation. You also select an operator, such as "equal to," "more than," and so on, 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 Requisition table that have a value of less than USD 10,000 in the Line Total, Currency field. In this way you create a selection criterion specification that obtains only purchase orders that amount to less than USD 10,000.
A selection criterion specification can contain several lines, so that you can, for example, define that the specification should obtain purchase orders that have a value of more than 10,000 in the Line total, currency field and that relate to a certain vendor. You do this by creating the necessary number of lines with criteria that should all be matched to meet the selection criterion specification.
Example 1
You want to create a selection criterion specification that obtains the purchase orders in company 1 that amount to less than USD 10,000. In the selection criterion specification you should create the following lines:
Outer Logical Operator | Table Section | Field Name | Operator | Value 1 |
Purchase Order |
Line total, currency |
Less than |
10,000 |
|
Purchase Order |
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 match 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."
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 the following lines:
Outer Logical Operator | Table Section | Field Name | Operator | Value 1 |
Purchase Order |
Line total, currency |
Less than |
10,000 |
|
Purchase Order |
Company no. |
Equal to |
1 |
|
OR |
||||
Purchase Order |
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 in itself, because the outer logical operator "OR" separates this line from the first criterion series.
As 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 no. 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. The following example illustrates this requirement.
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 no. 31201918, regardless of the total of the purchase order, but the company number should still be 1. In the selection criterion specification you create the following lines:
Outer Logical Operator | Table Section | Field Name | Operator | Value 1 |
Purchase Order |
Line total, currency |
Less than |
10,000 |
|
Purchase Order |
Company no. |
Equal to |
1 |
|
OR |
||||
Purchase Order |
Vendor no. |
Equal to |
31201918 |
|
Purchase Order |
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 question 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 use an inner logical operator. For example, you might want a criterion series to obtain all of 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 do not enter a table section and a field name 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 the following lines:
Outer Logical Op. | Table Section | Field Name | Inner Logical Op. | Operator | Value 1 |
Purchase Order |
Company no. |
Equal to |
1 |
||
Purchase Order |
Line total, currency |
Equal to |
10,000 |
||
Or |
Less than |
10,000 |
Because this uses no outer logical operator, all of 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." The following example illustrates the function of the "And" operator.
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 the following 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 thus 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.
The following examples illustrate this functionality.
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 the following 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.
The following selection criterion specification generates the same result as for 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.
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 the following 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.
-
Manually created selection criterion specification types — In the Selection Criterion Specification Types workspace you can manually create your own selection criterion specification types, indicating for each type the database table for which you can set up selection criteria on selection criterion specifications of the type in question. For instance, if you specify the "NoteLine" table on a selection criterion specification type, selection criterion specifications of that type can define criteria for the fields in that table.
For manually created types, you cannot create lines in the Selection Criterion Specification Lines sub-tab. Instead, you define the selection criteria with an SQL expression in a text file that you import using the Import SQL File action. For more information about this, see the description of the Import SQL File action.
You can only use manually created types in connection with monitors where they determine the criteria that the individual entries in the database table indicated by the type must meet for a certain action to be executed. For more information about this, see the description of the Monitors workspace.
-
Predetermined selection criterion specification types — Maconomy comes with a number of predefined types that you cannot change. Each of the predefined types has a predefined area of usage; you can only use them in that context. This means that you can only select for use in certain workspaces the selection criterion specifications of a given predefined type. Because the use of each predefined type is fixed, a number of tables and table sections (parts of tables) that are relevant in this context are preassigned to each type, allowing you to set up criteria on information in those tables.
On selection criterion specifications of predefined types, you set up criteria in the Selection Criterion Specification Lines sub-tab of this workspace.
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 a number of 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/allocation lines that match the selection criterion specifications of the line in question. 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 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 a number of 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 of the line in question. This way you can, for example, ensure that as long as 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 a number of 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. In the sub-tab of the Campaigns workspace you can create any number of lines, each of which contains its own selection criterion specification. When you initiate the campaign, Maconomy thus creates events for all of the contact companies and contact persons that match the selection criterion specifications in the sub-tab. This way you can, for example, focus the campaign on all of the contact companies within a certain postal code area.
-
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 sub-tab 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.
-