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 FoxPro 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 FoxPro Expression Builder to define your own criteria on an as-needed basis. However, you can instead select the FoxPro 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 FoxPro 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 area near the top of the window.
-
In the Logical list, select the operator that you want to use in the expression.
The operator is added to the Expression area.
-
Click to 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:
- Character values must be enclosed with quotation marks: 'value' or "value"
- Date values must be entered as numbers and enclosed with {braces}: {date}
- Logical values (such as T or F for True or False) must be enclosed in periods: .T.
- Numeric values are entered directly: 235.12
Example: To limit the selection to active employees, select the table (the alias for the Employee Personnel database file), for the field, in the list, and type '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 area.
-
In the Logical 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 the table, for the field, in the list, and type '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.