Field References

You can reference fields on the Business Object being validated simply by the name within the validation expression in the Validation field on the Configurable Validation page. The Advantage application retrieves the field values and makes them available to the validation framework at run time.

Performance Budgeting ExamplePerformance Budgeting Example

For example, in Performance Budgeting, if a business object has a field named ’code’, then the rule expression should be able to refer to the field by name as shown below.

code == '010'

or

code != null

The following internal and external classes outside the advantage.jar module are supported to utilize extended helper functions within the expression.

Class Name

Internal /External Package

StringUtils

org.apache.commons.lang3

Example for Financial, Administration, HRM, and VSSExample for Financial, Administration, HRM, and VSS

For example in Advantage Financial, if a business object has a field named FUND_CD, then the rule expression should be able to refer to the field by name as shown below.

FUND_CD == '010'

or

FUND_CD != null

To reference an old value of a field, simply add the “.old” prefix before the field name. To refer to the old Fund Code value in previous example, the expression should be:

old.FUND_CD == '020' and FUND_CD == '010'

Field values can be referenced via Advantage Framework provided JAVA methods using the “this” prefix as shown below and achieve the same result as above. It is highly recommended to use field references by name where possible to create readable and maintainable expressions.

this.getFUND_CD() == '010'

or

this.getData('FUND_CD').getString() == '010'