A function provides a quick way to perform an operation on data maintained by Sage HRMS. In most cases, you can use menus, text fields, lists, check boxes, and radio buttons to enter and manipulate data. But as described in the preceding topic about Expressions, sometimes you need to build your own expression to define the processing you want to perform. And in some of these cases, you might need to use a function as part of the value in an expression.
For example, the value of a last name field (P_LNAME) might be "Nelson." Instead, you want the name to appear in upper case (NELSON). You can use the UPPER function to accomplish this. Enter: UPPER(P_LNAME)="NELSON"
A function consists of a function name and, in most cases, one or more parameters that are used by the function. These parameters are always placed in parentheses following the function name. Each parameter is separated by a comma. The format of a function then, is as follows: DESC(parameter1, parameter2, ...)
The following section identifies some of the common functions and shows examples of their usage. For more information on functions, use online Help (by pressing F1) when you work with the Expression Builder.
CDOW() |
|
Gives you the name of the day of the week for a certain date. |
CMONTH() |
|
Gives you the name of the month for a certain date. |
DATE() |
|
Gives you the system date of the computer. |
DAY() |
|
Gives you the day of the month, expressed as a number. |
MONTH() |
|
Gives you the month of the year expressed as a number. |
YEAR() |
|
Gives you the year expressed as a number. |
CTOD() |
|
Converts a date from character-type to date-type. |
DTOC() |
|
Converts date-data to character data in the form MM/DD/YY. |
DTOS() |
|
Converts date data to character data in the form YYYYMMDD. |
TRANSFORM() |
|
Converts any type of data into formatted character data. |
VAL() |
|
Converts character data into numeric data. |
MAX() |
|
Finds the maximum of two numbers or dates. |
MIN() |
|
Finds the minimum of two numbers or dates. |
INT() |
|
Truncates a number to its integer; for example, to the whole number. |
LOWER() |
|
Changes all the characters to lowercase. |
LTRIM() |
|
Removes the left-most spaces from the field. |
SPACE() |
|
Adds a specified number of spaces to the end of a field. |
TRIM() |
|
Removes trailing spaces from the field. |
UPPER() |
|
Changes all the characters to uppercase. |
AGE() |
|
Calculates the employee's age. |
AN1000() |
|
Calculates the annual salary of an employee up to the next 1,000. |
ANNPAY() |
|
Calculates annual salary as a whole number. |
ANNUAL() |
|
Calculates annual salary to two decimal places. |
COUNTDEP() |
|
Counts all dependents or those covered by a benefit plan. |
DEPENDAGE() |
|
Calculates the dependent's age. |
DEPENDSMOKER() |
|
Use to determine if the dependent is a smoker. If you use this function in an expression in a benefit plan rate table, set the expression as: iif(dependsmoker()'Y','N') and set the columns as Y and N. |
MONTHLY() |
|
Calculates the employee's salary on a monthly basis. |
YEARSOLD() |
|
Calculates the employee's age as a whole number. |
YEARSSENIORITY() |
|
Calculates the employee’s number of years with the company. |
Note: Sage HRMS functions are unique to the Sage HRMS system. They are not accessible from within the Expression Builder. To use a Sage HRMS function, you must manually enter it into your expression. Refer to the alphabetical list of functions for examples on how to use the functions.
EMPTY() |
|
Use on fields, other than date fields, to determine whether or not the field contains any data. |
IIF() |
|
Responds differently if different conditions are true. |
ISNULL() |
|
Use to evaluate whether a date field is empty. Use the expression: IIF((Isnull(hbene.b_expdate) or hbene.b_expdate > Date()), " X"," ") |
SUBSTR() |
|
Extracts a specific portion of a field. |