Examples

The following two scenarios provide different ways to formulate the validation expression in the Validation field on the Configurable Validation page. Given the ability to reference JAVA classes and methods within the expression, there can be several ways an expression can be written to achieve the same results. Rule designer can be creative in choosing optimal techniques to build efficient expressions.

Scenario 1

Prevent numbers in a Code field that accepts both letters and numbers in baseline:

Examples in Performance BudgetingExamples in Performance Budgeting

Validation can be written using StringUtils helper methods.

StringUtils.containsAny(code, '0','1','2','3','4','5','6','7','8','9')

Validation can be written using Regex matching.

code=~ '.*\\d+.*'

Examples in Financial, HRM, VSS, and AdministrationExamples in Financial, HRM, VSS, and Administration

Validation can be written using StringUtils helper methods.

StringUtils.containsAny(CODE, '0','1','2','3','4','5','6','7','8','9')

Validation can be written using Regex matching.

CODE=~ '.*\\d+.*'

Validation can be written using the Advantage helper method if one is available.

AdvantageUtils.hasNumbers(CODE)

Scenario 2

Example in Performance BudgetingExample in Performance Budgeting

Implement a complex validation on a Fund Dimension where the functional requirements are: If Element Type entered is ‘Either’, and fiscal year is greater than 2000 and description is empty.

elementType == 'E' and fiscalYear > 2000 and description == null

Example in Financial, HRM, VSS, and AdministrationExample in Financial, HRM, VSS, and Administration

Implement a complex validation on an ESMT transaction where the functional requirements are: If the personnel Action code entered is 29, the 4th digit in the payroll number must be equal to 3 and pay class code must be equal to MONTH and table driven pay must be equal to N.

PERS_ACTN_CD == '29' and StringUtils.substring(PAYROLL_NO_CD, 3, 4) != 3 and PAY_CLS_CD != 'MONTH' and TBL_DRV_PY_RT_FL != 'N'

Please refer to the “Additional Configurable Validation & Formula Examples” topic for more use cases and example expressions.