Oracle Fast Formulas - Chapter 28: Oracle Fusion Fast Formulas – Using Database Items (DBIs)

 

Chapter 28: Oracle Fusion Fast Formulas – Using Database Items (DBIs)


Database Items (DBIs) are one of the most powerful features in Fast Formulas. They allow you to fetch real-time data from Oracle Fusion HCM database to use in your formula logic, making your formulas smarter and more dynamic.


๐Ÿ”น What Are Database Items?

Database Items (DBIs) are predefined references to data stored in Oracle Fusion. You can use them to read values like employee name, salary, job code, date of birth, etc.

These items follow naming conventions based on the data source and element name.


๐Ÿ” Common DBI Naming Patterns

TypeExample DBI Name
Element InputSALARY_ELEMENT_INPUT_VALUE
Person AttributePERSON_DATE_OF_BIRTH
Job InfoASSIGNMENT_JOB_NAME
GradeGRADE_NAME
AbsenceABSENCE_DAYS_TAKEN

๐Ÿงช Example Formula Using DBI

plsql
DEFAULT FOR SALARY_ELEMENT_INPUT_VALUE IS 0 BONUS = SALARY_ELEMENT_INPUT_VALUE * 0.10 RETURN_VALUE = BONUS

This formula uses a DBI to fetch the salary value and calculates a 10% bonus.


๐Ÿ“Œ Important Notes

  • You must declare a DEFAULT value for DBIs using DEFAULT FOR in case the item is null.

  • DBIs are read-only. You cannot assign a value to a DBI inside the formula.

  • DBIs can vary depending on the legislative data group or business object.


๐Ÿ“ฆ Where to Find DBIs?

  1. Navigate to:

    • Navigator > Payroll > Calculation Cards > Manage Fast Formula

  2. Use "Database Items" button to search and insert DBIs relevant to your context.


๐Ÿ” Example Use Case: Gender-Based Bonus

plsql
DEFAULT FOR PERSON_SEX IS 'U' DEFAULT FOR SALARY_ELEMENT_INPUT_VALUE IS 0 IF PERSON_SEX = 'F' THEN BONUS = SALARY_ELEMENT_INPUT_VALUE * 0.15 ELSE BONUS = SALARY_ELEMENT_INPUT_VALUE * 0.10 ENDIF RETURN_VALUE = BONUS

This formula gives a higher bonus to female employees.


๐Ÿง  Best Practices with DBIs

#Practice
1Always set default values using DEFAULT FOR
2Use meaningful DBIs to make formula logic dynamic
3Use the Database Item search tool to find exact DBI names
4Be cautious: DBI values are context-sensitive (based on date, assignment, etc.)

๐Ÿ“ Mini Quiz

1. What is the purpose of DEFAULT FOR in a formula?
a) It assigns values to a DBI
b) It sets fallback values when DBI is null
c) It defines the input data type
d) It creates a new database item

✅ Answer: b) It sets fallback values when DBI is null

2. Can you modify a DBI value within a formula?
a) Yes
b) Only in certain modules
c) No, DBIs are read-only
d) Only using input override

✅ Answer: c) No, DBIs are read-only

No comments:

Post a Comment