Defining your own selection criteria
In addition to choosing among the standard selection criteria, you can define your own criteria to determine which employee data you want to include for processing. In the Custom Criteria drop-down list, select one of the following methods to define your selection criteria
- The Criteria table
- The Criteria Builder
- The Expression Builder
After selecting or defining the expression for the selection criteria, it appears in the field.
If you need to clear the selection criteria, select the blank option from the drop-down list, .
Methods to define selection criteria
Use the Criteria Table to select a previously-defined expression associated with a code in the Criteria Code Table.
Note: You can also click Add New Code to open the Expression Builder to define your own criteria on an as-needed basis. However, you can instead select the Expression Builder directly from the list.
- In the list, select .
-
The Criteria Table page lists the criteria codes from your Criteria Code Table. Highlight the code you want to use.
Note: If you did not define any criteria codes, only the Add New Code selection appears in the Criteria Table window.
-
Click .
The expression appears for on the process page.
Use the Criteria Builder to create selection criteria by selecting a field from the Personnel (HRPERSNL) database, a relational operator, and a value for comparison. The Criteria Builder automatically formats the expression for you.
- In the list, select .
-
On the Criteria Builder page, build your expression:
- Make a selection in the list.
- In the list, select a relationship expression.
- For , type the value that you want to select for that field.
Example: To limit the selection to employees whose Job Title is Production Manager, select for , select for , and type Production Managers for .
-
If you need to add another criterion to the expression:
- Click the button. The first part of the expression appears in the window.
- Repeat step 2.
Example: To also limit the selection to Production Managers who started their job on or after 01/01/17, select for , select for , and type 01/01/17 for .
Note: If you want to delete all the criteria you defined and start over, click . If you want to delete one criterion at a time (from the last to the first), click .
-
When you finish defining the expression, click .
The page now shows the complete expression.
-
To save the expression to your Criteria Table:
- Click the button.
- In the Criteria Table window, type a description for your new expression.
- Click .
-
To save and select the expression, click OK to return to the process page.
The expression then appears in the Custom Criteria list.
Use the Expression Builder to create selection criteria by selecting a field from one of the databases, a relational operator, and a value for comparison.
Tip: To help avoid data processing errors, wait until you are comfortable using expressions and are knowledgeable of the Sage HRMS databases before creating these expressions. For more information about database files and fields, see Data Dictionary.
- In the list, select .
-
In the Expression Builder window, build your expression:
- In the list, select the database table to use.
-
In the list (which lists the fields from the database table you selected in step 2a), double-click the field to use.
The database table alias and field appear in the Expression panel above the buttons.
-
Place your cursor after the data field you just added and then type a space.
-
Click the Function Category drop-down and select the Function Category that you want to use in the expression.
When you change the Function Category drop-down, the Function drop-down also updates and displays a list of functions in the selected category.
Function CategoriesFunction Category Descriptions
Function Category
Description
Logical
Use to evaluate conditions and return results based on whether the conditions are True or False.
Date
Use with date values to extract part of the date, calculate durations such as tenure and format dates.
Math
Math functions perform numeric calculations.
String
Manipulate text values by removing spaces, change formatting...
-
Double-click the Function to add it to the Expression panel.
- Place your cursor at the end of the expression, and then type a space and the comparison value.
Note: Different types of values must be entered in different formats in SQL:
- Character values must be enclosed with single quotation marks: 'value'
- Date values must be enclosed with single quotation marks and in the format: YYYY-MM-DD
- Logical values should be enter typically as: 1 for TRUE and 0 for FALSE.
- Numeric values are entered directly: 235.12
Example: To limit the selection to active employees, select from the From Table drop-down, double click on the Employee Status Code from the Fields list, change the Function Category field to and then double click the equal sign in the list, and to finish your expression, type a space and then enter 'A'. Your expression would look like this:
PE.P_ACTIVE = 'A' -
If you need to add another criterion to the expression:
- Type a space at the end of the expression in the Expression panel.
- Select Logical from the Function Category drop-down.
- In the Function list, select
the operator, such as .
The operator is added to the Expression area.
- Repeat step 2 to add the second criteria.
Example: To also limit the selection to employees in the Sales department (organizational level 1), select from the From Table drop-down, double click on the Division Code from the Fields list, then double click the equal sign in the list and to finish your expression, type a space and then 'SALES'. Your expression would now look like this:
PE.P_ACTIVE = 'A' AND PE.P_LEVEL1 = 'SALES' -
When you finish entering the expression, click .
Tip: You can click Verify to make sure you used the correct structure for your expression. For example, there is an equal sign, it will confirm that there is a value after the equal sign. When you save your expression and return to the report or process to use the expression, Sage HRMS checks your expression again. If it is an illogical expression, a message displays and indicates what is wrong; return to the Expression Builder and fix the error.
The expression then appears in the Custom Criteria list.