Global Functions

This table lists the global functions that you can use when defining rules.

Name

Variable Type

Description

Get string value from value set String

Returns string format from one of the delivered value sets:

Get value from user defined table (UDT)

  • Parameter 1: "ORA_HRC_ACR_GET_VALUE_FROM_UDT"
  • Parameter 2: Legislative Data Group (LDG) Name in English. It must match the value selected in the Use Defined Table. Pass it null string in case there is no LDG in the User Defined Table. Example: US Legislative Data Group
  • Parameter 3: Date reference in a string format yyyy-mm-dd
  • Parameter 4: User Defined Table Name
  • Parameter 5: User Defined Column Name
  • Parameter 6: User Defined Row Name

Convert Gregorian Date into Hijri date Format

  • Parameter 1: "ORA_HRC_ACR_GREGORIAN_TO_HIJRI_DATE"
  • Parameter 2: Source date field in Gregorian format yyyy-mm-dd
  • Parameter 3: The required format of the Hijri date to be returned. Example: DD/MM/YYYY
  • Returned string values: Hijri date in the requested string format
Get number value from value set Integer / Long / Decimal

Returns number format from one of the delivered value sets:

Get value from user defined table (UDT)

  • Parameter 1: "ORA_HRC_ACR_GET_VALUE_FROM_UDT"
  • Parameter 2: Legislative Data Group (LDG) Name in English. It must match the value selected in the Use Defined Table. Pass it null string in case there is no LDG in the User Defined Table. Example: US Legislative Data Group
  • Parameter 3: Date reference in a string format yyyy-mm-dd
  • Parameter 4: User Defined Table Name
  • Parameter 5: User Defined Column Name
  • Parameter 6: User Defined Row Name
Get date value from value set Date

Returns date format from one of the delivered value sets. The value set must return a date string format yyyy-mm-dd.

Get value from user defined table (UDT)

  • Parameter 1: "ORA_HRC_ACR_GET_VALUE_FROM_UDT"
  • Parameter 2: Legislative Data Group (LDG) Name in English. It must match the value selected in the Use Defined Table. Pass it null string in case there is no LDG in the User Defined Table. Example: US Legislative Data Group
  • Parameter 3: Date reference in a string format yyyy-mm-dd
  • Parameter 4: User Defined Table Name
  • Parameter 5: User Defined Column Name
  • Parameter 6: User Defined Row Name
Get the current state of the transaction String

Returns the transaction approval phase value from the business object.

  • Parameter 1: Object instance to be passed, can be current autocomplete business object or its associated rows.
  • Returned string values:
    • Initial submit: The fresh changes being submitted for approval for the first time. The function returns phase as "Initial submit" until first submit is done. It means if function is called on save (prior to submit), still the phase shows as "Initial submit"
    • Edit by approver: Approver has done edit from notification and is submitting changes. The function returns phase as "Edit by approver" when submit is clicked after editing the transaction.
    • Request for information: Approver sent back to the originator and the originator submits their response. The function returns phase as "Request for information" when submit is clicked when responding to RFI and not when RFI is raised from notification. To launch edit during RFI, there is Edit Info button. When you click this button and on subsequent changes and submit the transaction, the global function will return phase as "Request for information"
    • Final approval: Approver process is complete and changes are in the process of committed in the data base. The function returns phase as "Final approval" when submit is clicked by the final approver.
Convert string in yyyy-mm-dd format to a date Date Returns a date converted from a string. It can be used only for date comparisons and can't be used for defaulting values.
Get incumbent count for a position as of a date Integer Returns the current incumbent count for a position as of a date.

These parameters are provided for the function

  • Position ID
  • Effective Date

Substring

String

Returns a part of a string

These parameters are provided for the function

  • String

  • Start Index: starting index is inclusive

  • End Index: ending index is exclusive

Expression Example

  • Variable type for the substring must be a string

  • Rule: you can only select departments starting with HR-US

  • Start index: 0 (included)

  • End index: 5 (excluded)

Get string value from HCM feature details

String

Returns setup data from multiple sources in HCM, such as address validation option for a legislation or address style code for a legislation.

These 5 parameters are provided for the function

  • Parameter 1 - Function key to determine the value to be returned such as address validation option.

  • Parameter 2 - A commonly used parameter. It indicates the legislation code for the setup data such as US for the United States.

  • Parameter 3 - A selectively used parameter that can be blank if not used in the function.

  • Parameters 4 and 5 - They aren't used currently and can be blank.

These functions are supported.

Address Validation Option for a Legislation

  • Parameter 1: "AddrValidationFlag"

  • Parameter 2: legislationCode (US, GB, and so on)

  • Row: object instance to be passed, can be current an autocomplete business object or its associated rows.

  • Example of business requirement: In the Bangladesh legislation, a validation should be raised on the pin code if it's not equal to 4 digits and if address validation is Y.

    • Autocomplete Rule

      • Rule type: Business Object Validation Type

      • Business Object: Address

      • Global Function: Get HCM Feature as String

      • Parameters

        • Parameter 1: AddrValidationFlag

        • Parameter 2: BD (legislation code for Bangladesh)

      • Returned string value: Y or N

Address style code for a legislation

  • Parameter 1: AddressStyleCode

  • Parameter 2: legislationCode (US, GB, and so on)

  • Row: object instance to be passed, can be current autocomplete business object or its associated rows..

  • Returned string value: Depends on the legislation. List of values can be found in PAY_LEGISLATION_RULES table.

Payroll license for a legislation

  • Parameter 1: PayrollLicense

  • Parameter 2: legislationCode (US,GB, and so on)

  • Row: object instance to be passed, can be current autocomplete business object or its associated rows.

  • Returned string values:

    • PAY: Payroll

    • HRY: Payroll Interface

    • NULL: HR only license

Payroll period start date for an assignment

  • Parameter 1: PayPeriodStartDate

  • Parameter 2: AssignmentId value as String (Number to be converted as String) or "this.AssignmentId"

  • Parameter 3: Effective Start Date value as String or "this.EffectiveStartDate"

  • Row: object instance to be passed, can be current autocomplete business object or its associated rows.

  • Returned string value: Date

Payroll period end date for an assignment

  • Parameter 1: PayPeriodEndDate

  • Parameter 2: AssignmentId value(Number to be converted as String) as String or "this.AssignmentId"

  • Parameter 3: Effective Start Date value as String or "this.EffectiveStartDate"

  • Row: object instance to be passed, can be current autocomplete business object or its associated rows.

  • Returned string value: Closest payroll period end date

Get long value from HCM Params

Decimal

Returns a long value from HCM Params.

Get integer value from HCM Params

Integer

Returns an integer value from HCM Params.

Get previous person rating

String

Returns the latest performance rating for a person ID. For example, you can use this function when a person is recommended for rehire.

Valid values are listed on the Profile Rating Models page on the My Client Groups tab

Get today's date in custom time zone

Date

Returns a date in a specific time zone to reconcile server time with user time. For example, if you have a rule to prevent future transactions and your HR specialist is in India and your server is in the US, then the rule will prevent the HR specialist from entering transaction effective today (client time) if you don't reconcile the server time using this function.

The value returned is a date with a time zone. A null value is returned if the time zone passed as HCM Params is invalid.

For more information on the time zones accepted as HCM Params, refer this Java time zone API :

getTimeZone public static TimeZone getTimeZone(String ID)

Gets the time zone for the given ID.

Parameters: ID - Identifier for a time zone, either an abbreviation such as "PST", a full name such as "America/Los_Angeles", or any other user-defined ID such as, "GMT-8:00". Note that the support of abbreviations is for JDK 1.1.x compatibility only and full names must be used. Returns the specified time zone, or the GMT zone if the given ID can't be understood.

Java Time Zone API Values are located on the Oracle Help Center at docs.oracle.com/javase/7/docs/api/java/util/TimeZone.html#getTimeZone(java.lang.String)