An Overview of Element Input Validation Fast Formula in Oracle Fusion HCM Cloud Application
An Overview of Element Input Validation Fast Formula in Oracle Fusion HCM Cloud Application
Introduction
An element input validation formula is used to validate one or more element entry values. This type of
Fast Formula is used to provide a default value for an element entry value, or to calculate entry values
based on the user's entries in other entry values.
Some of the details like the page section , attribute field , usage as well as execution time associated
with this type of fast formula is mentioned in below table:
Page Section Attribute / Usage / Purpose Execution Time
Field
Element Details Validation To validate one or more entry values for On Saving
or Element Formula the element based on entries in other Element Entry
Eligibility entry values.
Element Details Calculation To provide values for one or more entry On Saving
or Element Formula values using a calculation that takes input Element Entry
Eligibility from these or other entry values.
Element Details Defaulting To provide default values for one or more On Element Entry
or Element Formula entry values. Creation
Eligibility
Input Value Validation On Entering
Formula To validate one entry value Element Entry
independently of others. Input Value
Fast Formula Association Element Eligibility Section
*Note: In all cases, a formula at the element eligibility level overrides an equivalent formula at the
element level
Contexts Associated with this Fast Formula
The following contexts are available to all formulas of this type:
LEGISLATIVE_DATA_GROUP_ID
DATE_EARNED
EFFECTIVE_DATE
The following contexts are available to formulas at element or element eligibility level only,
not to validation formulas at the input value level:
PERSON_ID
PAYROLL_RELATIONSHIP_ID
PAYROLL_TERM_ID
PAYROLL_ASSIGNMENT_ID
HR_RELATIONSHIP_ID
HR_TERM_ID
HR_ASSIGNMENT_ID
Input Variables
The following input variables are available to formulas of this type.
Formula Usage Input Variables Comments
Validation formula at entry_value Passes the value to be validated. You must
input value level declare the input variable as the
appropriate type for the element input
value.
Validation formula at Any element input value Replace spaces in the input value name
element or element name that corresponds to with underscores in the input variable
eligibility level an entry value. name.
It doesn't matter whether you use
uppercase or lowercase for the name.
Defaulting formula None Use database items or other logic instead.
Calculation formula Any element input value Replace spaces with underscores.
name of an entry value. You don't need to provide all of the
available entry values
Return Values
The following return values are available to formulas of this type
Formula Usage Return Values Comments
Validation formula at formula_status Must be either 'S' (success) or 'E' (error).
input value level Required.
Validation formula at formula_message Text of message passed to user if the
element or element validation fails. Optional.
eligibility level
Defaulting formula Any element input value A return value overrides any default value
name of an entry value. provided on the input value in the element or
element eligibility record.
Calculation formula Any element input value You don't need to return all of the available
name of an entry value. entry values. You can return the entry values
that were passed in as input variables, or
other entry values.
Sample Formula
A sample Fast Formula Code snippet of the various categories for ready reference follows:
1. Validation Formula At Input Value Level:
Formula Text
inputs are entry_value(date)
if(entry_value = '01-APR-2008' (date))
then
(
formula_message = 'Valid date'
formula_status = 'S'
)
else
(
formula_message = 'Invalid date'
formula_status = 'E'
)
return formula_message, formula_status
2. Validation Formula at Element or Eligibility Level:
Formula Text
inputs are hours_worked, rate, earning_date(date),
comment(text)
if(hours_worked > 80) then
(
formula_message = 'You are within the working limit.'
formula_status = 'S'
)
else
(
formula_message = 'You have worked too many hours.'
formula_status = 'E'
)
return formula_message, formula_status
3. Calculation Formula at Element or Eligibility Level:
Formula Text
inputs are hours_worked, rate,
comment(text)
if(hours_worked > 80) then
(
rate = rate * 1.2
comment = 'Your rate has been increased'
)
return rate, comment
4. Defaulting Formula at Element or Eligibility Level:
Formula Text
if(CATEGORY = 'S') then
(
rate = 20
)
else
(
rate = 30
)
rate_code = 'B'
return rate, rate_code
Seeded Fast Formula: Severance Payments Years of Service Input Value Validation
Till now we have tried to understand what an Element Input Value fast Formula is and the various
places the same can be used along with an insight into the contexts , input variable and return values
of the same.However, the delivered Application has few Element Input Value Validation fast formula
pre-built already. One such formula is Severance Payments Years of Service Input Value
Validation.This formula applies a validation on the Element Input value field depending on the Years
of Service. If an employee’s length of service does not falls between a specific range then an error
message is displayed.One can found this Formula using the following Navigation:
Login To Application (with appropriate credentials) -> Navigator -> Setup And Maintenance ->
Manage Fast Formula -> Search for Fast Formula ( Severance Payments Years of Service Input
Value Validation)
inputs are
entry_value (number)
l_entry_value = entry_value
return
FORMULA_STATUS,
FORMULA_MESSAGE
)
l_entry_value = l_entry_value * 2
return
FORMULA_STATUS,
FORMULA_MESSAGE
)
FORMULA_STATUS = 'S'
return
FORMULA_STATUS
https://apps2fusion.com/old/oracle-fusion-online-training/fusion-applications/fusion-payroll/1767-
an-overview-of-element-input-validation-fast-formula-in-oracle-fusion-hcm-cloud-application