In some cases, an expression is merely an item of data presented in a different format. For instance, the last name field of an employee might be "Nelson." That same last name expressed in all capital letters would be "NELSON." But as it is most commonly used, an expression is similar to a mathematical formula; it is a statement of comparison among numbers or other data.
For instance, when you perform a Mass Update process, you might want to include all employees with an original hire date prior to June 1, 2016. Communicating this in words, you might say, "I want to include all employees who were hired prior to June 1, 2016." For Sage HRMS, you must communicate this as an expression. The Expression Builder (also called the Criteria Builder) helps you create the following expression:
PE.P_ORIGHIRE < {06/01/2016}
In most cases, the expression you build will be a comparison between a database field and a value. The expression therefore, consists of three parts:
The field identifies the database and the field to be used for the comparison. In the preceding example, "PE." tells the system to look in the HRPERSNL database file (because PE is the "alias" for the HRPERSNL database file - also called the Employee Personnel file). And "P_ORIGHIRE" (the Original Hire Date) is the name of the field.
The relationship part of the expression defines how the field is compared to the value. The relationship between the two can be one of the following:
In the example above, the less than symbol (<) tells the system you want the field (Original Hire Date ) to be less than the value (6/1/2016).
The value is the part of the expression that the field is compared to. The data type of the value must match the data type of the field. For example, if the field is a date field, you must enter a date for your value. In other words, you could not enter 999, since you can’t compare a date to a number.
Here’s another example. If the field in the expression is last name, you cannot enter a date as your value since a date doesn’t match the data type of a last name.
So, in the example above, since the Original Hire Date (P_ORIGHIRE) is a date data type, the data type of the value matches because it’s a date.