Payroll User Interface Configuration Formula Type

You can use the Payroll User Interface Configuration formula type to control the configurable preferences for payment methods. On the Fast Formulas page, you can create formulas to override the default values by creating new values for these preferences.

After you create your formulas, you can attach them to the appropriate rows in the PAYROLL_USER_INTERFACE_CONFIGURATION user-defined table.

This table lists the configurable preferences, their predefined row name in the user-defined table, purpose, and default values.

User-Defined Row Name

Purpose

Default Value

Default Organization Payment Method

Sets the default organization payment method in the simplified UI for each legislative data group.

(Not applicable)

Execute Personal Payment Method Validation

Validates the customer personal payment method criteria. For example, you can create only one payment method with a specific account type.

No

Maximum Number of Personal Payment Methods

Sets the maximum allowed number of personal payment methods.

No limit

Payment Types Available to Workers

Limits the creation of personal payment methods to a specific payment type.

All available organization payment methods

Prevent Edit Personal Payment Method

Prevents employees from modifying any personal payment method details that meet the criteria set in the formula.

No

Show Percentage or Amount

Displays only Amount or Percentage amount types on the Manage Personal Payment Methods page.

Both

Note:

Each preference that you configure must have its own formula. You can't combine different preferences into a single formula. For example, you can't create a formula that sets the default organization payment method and also sets the maximum number of allowed personal payment methods.

The Payroll User Interface Configuration formula type doesn’t support database items. As with other formula types, to retrieve information when a database item isn't available, use the GET_VALUE_SET function.

Note:

When using the GET_VALUE_SET function, ensure that the Value Attributes Table Alias field for the value set has no value. The function fails if you provide an alias.

These input values are available to all formulas of the Payroll User Interface Configuration formula type:

Input Variable

Type

Description

EFFECTIVE_DATE

Text

The effective date on which the formula validation will be applied.

LEGISLATIVE_DATA_GROUP_ID

Text

The number that identifies the legislative data group for the variable.

PAYROLL_RELATIONSHIP_ID

Text

The number that identifies the payroll relationship for the variable.

These input values are available to the two personal payment method validation formulas:

Input Variable

Type

Description

AMOUNT

Text

Total amount to be paid to the personal payment method.

BANK_ACCOUNT_NUMBER

Text

Bank account number for the external bank account.

BANK_ACCOUNT_TYPE

Text

Type of the external bank account for the personal payment method.

BANK_NAME

Text

Name of the bank associated with the personal payment method.

BRANCH_NAME

Text

Name of the bank branch associated with the personal payment method.

CURRENCY_CODE

Text

The currency code of the personal payment method.

ORGANIZATION_PAYMENT_METHOD_NAME

Text

Name of the organization payment method.

PAYMENT_AMOUNT_TYPE

Text

Percentage or amount attributed to the personal payment method.

PAYMENT_TYPE_NAME

Text

Payment type, such as check or direct deposit for a particular organization payment method.

PERCENTAGE

Text

The percentage amount attributed to the personal payment method.

PERSONAL_PAYMENT_METHOD_NAME

Text

The name of the personal payment method.

PRIORITY

Text

The priority order of the personal payment method.

This context is available only for formulas mapped to the Default Organization Payment Method row in the user-defined table.

  • PAYMENT_TYPE_NAME (text)

    Text representing the payment type in the expected format, for example, EFT or Check.

Unlike other formulas, the return values for the Payroll User Interface Configuration formula type are variables that you declare in your formulas. Refer to the sample formulas for examples.

This sample formula sets default organization payment methods in LDG_A (ID 300100001) based on the payment type. To use this rule, attach your formula to the Default Organization Payment Method row in the PAYROLL_USER_INTERFACE_CONFIGURATION user-defined table. In this example, the valid return values for DEFAULT_OPM are the exact names of organization payment methods.

/***********************************************
FORMULA NAME: Default OPM Formula 
FORMULA TYPE: Payroll User Interface Configuration/
************************************************
/* Configuration */
IF (LEGISLATIVE_DATA_GROUP_ID = '300100001' 
AND PAYMENT_TYPE_NAME = 'EFT')
THEN DEFAULT_OPM = 'NACHA_OPM_A
' ELSE IF (LEGISLATIVE_DATA_GROUP_ID = '300100002
'AND PAYMENT_TYPE_NAME = 'Check')
THEN DEFAULT_OPM = 'CHECK_OPM_A'
ELSE DEFAULT_OPM = 'NODATA' 
RETURN DEFAULT_OPM 
/* End Formula Text */

This sample formula limits personal payment methods to be based only on organization payment methods of EFT (electronic funds transfer) or check payment types. To use this rule, attach your formula to the Payment Types Available to Workers row in the PAYROLL_USER_INTERFACE_CONFIGURATION user-defined table. In this example, the valid return values are the base payment type names defined in the table PAY_PAYMENT_TYPES_VL.

/****************************************************
FORMULA NAME: Worker Payment Types Formula 
FORMULA TYPE: Payroll User Interface Configuration/
******************************************************/
* Configuration */
PAYMENT_TYPE[1] = 'EFT'
PAYMENT_TYPE[2] = 'Check' 
RETURN PAYMENT_TYPE
/* End Formula Text */

This sample formula limits the number of personal payment methods for employees in LDG_A (ID 300100001) to 3, and employees in LDG_B (ID 300100002) to 1. To use this rule, attach your formula to the Maximum Number of Personal Payment Methods row in the PAYROLL_USER_INTERFACE_CONFIGURATION user-defined table. In this example, the valid return values for MAX_NUM_PPMS are integers.

/****************************************************
FORMULA NAME: Maximum PPM Formula 
FORMULA TYPE: Payroll User Interface Configuration
*****************************************************/
/* Configuration */
IF LEGISLATIVE_DATA_GROUP_ID = '300100001' 
THEN MAX_NUM_PPMS = '3' 
IF LEGISLATIVE_DATA_GROUP_ID = '300100002' 
THEN MAX_NUM_PPMS = '1' 
ELSE 
MAX_NUM_PPMS = 'NO DATA' 
RETURN MAX_NUM_PPMS
/* End Formula Text */

This sample formula sets a restriction to display only the Percentage amount type and field on the Manage Personal Payment Methods page. To use this rule, attach your formula to the Show Percentage or Amount row in the PAYROLL_USER_INTERFACE_CONFIGURATION user-defined table. In this example, the valid return values for PAYMENT_AMOUNT_TYPE are AMOUNT or PERCENTAGE.

/*******************************************************
FORMULA NAME: Show Percentage Formula 
FORMULA TYPE: Payroll User Interface Configuration
********************************************************/
/* Configuration */
PAYMENT_AMOUNT_TYPE = 'PERCENTAGE'
RETURN PAYMENT_AMOUNT_TYPE
/* End Formula Text */

This sample formula validates that the first personal payment method is Pay Card and the payment type is either EFT or IAT. And the account type is Pay Card. This formula ensures that the first personal payment method meets these criteria and that an employee has only one personal payment method of this type.

/***************************************************
FORMULA NAME:  Execute Personal Payment Method Validation
FORMULA TYPE: Payroll User Interface Configuration
***************************************************/
 IF (PAGE_NAME = 'DETAILS'){
 //PPM Validation
    //check if there is PPM for PAYROLL_RELATIONSHIP_ID
       COUNT = NUMBER_OF_PPMS   

       //This returns the number of PPMs for a payroll 
         relationship ID using a value set
         //If this is first PPM
           IF(COUNT==0){
               IF((PAYMENT_TYPE_NAME==EFT OR PAYMENT_TYPE_NAME==IAT) 
               AND BANK_ACCOUNT_TYPE==PAYCARD){
               //If first PPM and is of type PAYCARD, PPM can be created
                 RETURN_VALUE[1]= 'N'
               }
               ELSE{
               //If first PPM is not PAYCARD, throw error message
                 RETURN_VALUE[1]='Y'
                 RETURN_VALUE[2]='ANY_VALID_ERROR_MESSAGE'
               }
           }
           //This is not the first PPM.
           ELSE{
             IF((PAYMENT_TYPE_NAME==EFT OR PAYMENT_TYPE_NAME==IAT) 

             AND BANK_ACCOUNT_TYPE==PAYCARD){
             //If multiple PAYCARD PPMs, throw error message
               RETURN_VALUE[1]='Y'
               RETURN_VALUE[2]='ANY_VALID_ERROR_MESSAGE'
             }
             ELSE{
                RETURN_VALUE[1]='N'
             }
          }
       }
        //When changing the priority of a PPM
  ELSE IF(PAGE_NAME == 'SUMMARY')
  {
     //Get the highest priority for PAYROLL_RELATIONSHIP_ID
       IF (PRIORITY == HIGHEST_PRIORITY){        
           //Gets the highest priority among the PPMs for a particular payroll relationship ID
           //by executing a value set. Change in priority throws error message.
             RETURN_VALUE[1]='Y'
             RETURN_VALUE[2]='ANY_VALID_ERROR_MESSAGE'
       }
       ELSE 
             RETURN_VALUE[1]='N'
  }
  }

This sample formula prevents a self-service user from editing personal payment methods that are associated with an organization payment method of payment type Check.

/**************************************************************************************
FORMULA NAME: Prevent Edit Personal Payment Method
FORMULA TYPE: Payroll User Interface Configuration
Expected Behavior : If value returned is N, no change in functionality
                    If value returned is Y, Save/Submit buttons will be disabled in edit flow to prevent the edit of personal payment method. 
                    The Delete buttons will also be disabled for the personal payment methods

Sample Input File Format:
User Interface|Legislative Data Group|Effective Date|Payroll Relationship|Payment Type 
***************************************************************************************/

/* inputs */

INPUTS ARE PAGE_NAME (text), LEGISLATIVE_DATA_GROUP_ID (text), PAYROLL_RELATIONSHIP_ID (text), EFFECTIVE_DATE(text), PERSONAL_PAYMENT_METHOD_NAME (text), ORGANIZATION_PAYMENT_METHOD_NAME (text), PAYMENT_TYPE_NAME (text), CURRENCY_CODE (text),PAYMENT_AMOUNT_TYPE (text),PERCENTAGE (text),AMOUNT (text),PRIORITY (text),BANK_NAME (text),BRANCH_NAME (text),BANK_ACCOUNT_NUMBER (text), BANK_ACCOUNT_TYPE (text)

/* Configuration */

IF ORGANIZATION_PAYMENT_METHOD_NAME='Check' THEN
(
OUTPUT_VALUE = 'Y'
)
ELSE
(
OUTPUT_VALUE = 'N'
)

RETURN OUTPUT_VALUE

/* End Formula Text */