Introduction
Recently, I have been doing a lot
of work with Oracle Fusion Fast Formula for HCM Compensation. So, I thought why
don’t I create a blog to share the knowledge I have gained?!
Well, in short, Fast formula is
an Oracle HCM payroll engine and other products like Compensation (COMP),
Benefit (BEN), Talents (OTL), Absences (ABS) and Payroll (PAY) use the engine. These products have provided places to attach
formula, whenever there is a need of a complex/custom logic. The consultants add
their own logic via a set of statements and subprograms which is the Fast
Formula.
Language of Fast Formula
The Fast Formula uses its own
language similar to C and PL/SQL. If you are familiar with either one of these
languages, you will not find it difficult to understand the syntax of the fast
formula.
Basic Components of Fast Formula
Before start writing any fast
formula, you need to understand the following.
1)
Formula types
2)
Context
3)
Database items (DBI)
4)
Input values
5)
Return Variables/Values.
Formula types:
The Formula types are created by
products like Benefit (BEN), Compensation (COMP), and Payroll (PAY). This
is giving a name to a group of formulas. The name will help in identifying which
product the formula is being used and where it is used.
Some examples are given below:
- Compensation Person Selection: This formula type is from Compensation (COMP) and is used to validate the person selection in Compensation and Total Compensation (TCS) process.
- Participation and Rate Eligibility: This formula type is from Benefit (BEN) and is used in COMP, BEN, TCS and ABS to determine the eligibility of a person.
- Total Compensation Item: This formula type is from Total Compensation (TCS) and is used to create or calculate a value for total compensation items.
Context:
Context is a very important part of
Fast Formula. This is defined for a Formula Type. Different Formula Types
support different set of Context. You
can find the contexts that are supported by a formula type from the documentation
of individual products like COMP, BEN etc.
The value to the context is set by the application when the fast
formula is executed.
For example, the Compensation (COMP) sets the value to context like PERSON_ID, ASSIGNMENT_ID etc while executing the Fast Formula.
For example, the Compensation (COMP) sets the value to context like PERSON_ID, ASSIGNMENT_ID etc while executing the Fast Formula.
The context behaves like a value
to the bind variable of a SQL.
“Select
Full_name from PERSON_TABLE where person_id =
:P_ID”
In this SQL, P_ID is a bind
variable and the value for the bind variable is provided by the Context, PERSON_ID.
The value to the context PERSON_ID is
set by the application while executing the Fast Formula. In Fusion, Fast
Formula developer can also set the value using method CHANGE_CONTEXTS provided the Fast Formula type supports the Context.
Related methods for the context
are:
·
GET_CONTEXT
: To find the value from the context
·
CONTEXT_IS_SET:
To find whether a context is set
·
CHANGE_CONTEXTS:
to set one or more contexts
Database Items (DBI):
DBI is similar to a single data
or a value from a column or a set of values (Array). In Fusion, you cannot write a meaningful fast
formula without using DBI. DBI provides values from the database tables. The
source of the DBI is called Route. Route is similar to a “from and where”
clause of a SQL statement.
For example of Route: “FROM PERSON_TABLE WHERE PERSON_ID =
:PID”.
For this Route, there could be
many DBIs like Full_Name, First_Name, Last_Name, Date_of_Birth etc…
DBI = Select clause = Select person_id, full_name, date_of_birth
Route = From clause and Where clause = FROM Person_TABLE where person_id = :P_ID
Context = Value for binding variables = PERSON_ID = 000001
Route = From clause and Where clause = FROM Person_TABLE where person_id = :P_ID
Context = Value for binding variables = PERSON_ID = 000001
The number of DBI (Database items) supported by a Formula
type depends on the context provided by the Formula type.
For example, if a Formula type supports context PERSON_ID and EFFECTIVE_DATE, the formula type can use all the DBI from person level. If it also supports ASSIGNMENT_ID and EFFECTIVE_DATE, it can use the DBI from Employment (Assignment) too.
Input Values:
Input values are additional
values/information that are passed by the individual applications to the Fast Formula
to assist the Formula developers while executing the Fast Formula. This
information can be collected from individual application’s documentation.
For example,
- Plan Start Date and Plan End Date are input values of Compensation Plan Setup.
- Period Start Date and End Date are
input values of Total Compensation Statement.
Return Variables/Values:
Most of the Formula types do not
care about the return variables. There are some exceptions where some Fast
Formulas expect to return more than one value. Therefore, the variable has to be set as per
the documentation. In these cases, the formula will not work as expected if the
return variables are not correct. In some
other cases, even if there is one return value, it needs to be a specific
return variable.
For example,
- Total Compensation Item Fast Formula expects the
return variable,
“COMPENSATION_DATES,VALUES,
ASSIGNMENTS,LEGALEMPLOYERS.”
- Benefit Eligible fast formula expects the return variable, ELIGIBLE.
In some cases, the formula type expects
certain values. For example, Benefit Eligible and Compensation Person Selection
Fast Formula types expect either a ‘Y’ or ‘N’.
Mostly, the dates are returned in “YYYY/MM/DD” format.
Mostly, the dates are returned in “YYYY/MM/DD” format.
We will get into more details in the next
blog. If you have any questions or suggestions please feel free to comment.
Nice Blog. Very Informational.
ReplyDeleteuntil now, I always heard of the strong features of fast formula but never understood it. This article covers the basics of FF and really helpful for a novice like me
ReplyDeleteThanks Tilak and Lakshmi:)
Hi,
ReplyDeleteThis is a very good Fusion FF introduction.
I have a doubt, if we want to see the different DBIs we can go into FF_DATABASE_ITEMS table and view the DBIs.
Likewise, can we know what are the different i/p values of different FF types.
Thanks
Sachin
Input values are determined by each product. It is not stored anywhere. Only the document of each product can give the information.
DeleteIf you need information any specific formula type, let me know. If I have the information I will let you know.
I am planning to cover the input values for compensation in my next blog.
Hi Tilak,
DeleteDo you have any documents do identify input values related OTL like Time Entry,Time calculation .
I believe OTL has published a document on that. Can you please check with your support person.
DeleteThis comment has been removed by the author.
ReplyDeleteHi Tilak,
ReplyDeleteDo we have any source for various seeded formula functions (string/math etc functions) that can be used in fusion formulas. It would be good to have the list of all such functions.
Also, can we write custom formula functions in fusion, like EBS?
Thanks,
RK
Hi Ramakanth,
DeleteI am planning to blog on all the function details in the future after explaining the
“Formula calls Formula” and “Arrays” (input values, DBI, variables, return values).
If you have access to a database, you can find the Function details.
In SAAS environment, you do not have write access to DB. Therefore, writing the Formula function is not an option, you will need to use DBIs.
If you have on premise environment, you can write functions. But there is no UI to add the Formula function. You need to have the understanding of how to seed the Formula Functions (Tables) and what are the grants needed to execute the Functions.
Hope this helps, if you have any further question please let me know.
Hi Tilak,
ReplyDeleteI did like to view all the fast formulas that a certain plan in Compensation Fusion has used? How can we do this?
Thanks
That is a good question, there are 2 possibilities I can think of
ReplyDelete1)Export the plan , open the xml file, look for the Word Rule or Formula.
2) You need to have the access to DB and need to understand the structure.
There are different table supports different type of the FastFormula. I need to look at the table and column names.
Please let me know the option one is not working for you.
Hi Tilak and Lahshmi,
ReplyDeleteIs there a way to load EBS fast formula into Fusion without any changes ?
will fusion support people soft formaula as well in fusion ?
Cant you copy and paste ?
ReplyDeleteAre you planning load too many formulas ?
This comment has been removed by the author.
ReplyDeleteI personally never used the global variable
DeleteThe followings are extract from the user guide
Use global values to store information that does not change often, but
you refer to frequently, as for example Company Name, or
company–wide percentages used in the calculation of certain bonuses.
You can use global values as variables in formulas by simply referring
to the global value by name.
You can never change a global value using a formula. You change
global values in the Globals window. Global values are datetracked so
you can make date effective changes ahead of time.
Global values are available to all formulas within a Business Group.
To define a global value:
1. Set your effective date to the date when you want to begin using
the global value.
2. Enter a name, data type (number, text, or date), and value. You can
also enter a description
Global Values
Global values are visible from within any formula. Use global values to
store information that does not change often, but you refer to
frequently, such as company name, or a location allowance that applies
to many employees. Global values are datetracked so you can make
date effective changes ahead of time.
You can never change a global value using a formula. You alter global
values using the Globals window. The global value is the same across
all formulas within a Business Group.
See: Using the Globals Window: page 1 – 12
Below is an example using a global value.
/* Formula: HAZARD ALLOWANCE FORMULA */
IF basic_hours > hazard_limit
THEN
hazard_allowance = 2.30
ELSE
hazard_allowance = 2.00
RETURN hazard_allowance
In this example, hazard_limit is a global value, which has been preset to
reflect the point at which workers’ hazard payment increases
HI Tilak and Lahshmi,
ReplyDeleteMany thanks for sharing the information.
I am new to fast formulas.. I have one doubt regarding input values.
can you please clarify me what is the difference between input values and DBIs?
Input value means those we create in the element page? or different one?
Thanks a lot for the effort your putting on this blog.
Narendra
Hi Tilak and Lakshmi,
ReplyDeleteMany thanks for sharing your knowledge on fast formulas.
I am new to this topic.. I have a small doubt regarding input values.
What is the difference between input values and Database items?
Is input value is the one we create on elements page? is there any relation with that?
Thanks,
Narendra
Formula input value has nothing to do with Element type input values.
ReplyDeleteIn FF, input values are passed by the process (developer) to Fast Formula to help the Fast Formula Developer.
DBI are value stored in the table and extracted by Fast formula.
please read the explanation in this page and example from Compensation introduction.
This comment has been removed by the author.
Deleteyou are thinking input value as a data from a column.
DeleteThink input value as "in parameters" to your procedure (FF) and DBI as a value from a column.
The person calling your code (FF) will pass the value for the in parameters.
you may make use of the parameter value to write your logic.
Hi Guys,
ReplyDeleteI am always getting this in my log-
-------------------------------------------------------------------------------
Process End Time : Oct 12, 2016 9:22:02 PM
Org ID: |=TYPE_CODE='PER_ASG_BUSINESS_UNIT_ID' ---Why is it showing like this, am i not passing the value correctly?
BU ID: |=TYPE_CODE='PER_ASG_BUSINESS_UNIT_ID'
I think you are using get_value_set.
DeletePlease explain your issues and the setup and provide your code.
If it is the issue of get_value_set provide the screen of the value_set.
This comment has been removed by the author.
ReplyDeleteVery Informational Blog!
ReplyDeleteI have created a fast formula for performance ratings-Competency calculation using numeric ratings DBI for performance Templates.The fast formula was compiled successfully,but the value doesn't return in performance documents page.
ReplyDeleteSorry to hear that. With your information, I can not do much. please provide formula and let me know how it is executed (ess or from UI)? .
DeleteHave you debugged the formula through the log ?
Hi,
DeleteI am executing the fast formula in Fusion Cloud UI at performance template page.
Formula Type is : performance rating Model.
The Formula as below,
/*================DEFAULT SECTION BEGIN=========================*/
DEFAULT_DATA_VALUE FOR HRA_EVAL_COMP_RATING_FC_CONTENT_ITEM_CODE IS 'XXX'
DEFAULT_DATA_VALUE FOR HRA_EVAL_COMP_RATING_FC_NUMERIC_RATING IS 0
DEFAULT_DATA_VALUE FOR HRA_EVAL_COMP_RATING_FC_TARGET_NUMERIC_RATING IS 0
DEFAULT_DATA_VALUE FOR HRA_EVAL_ITEM_RATING_FC_NUMERIC_RATING IS 0
DEFAULT_DATA_VALUE FOR HRA_EVAL_ITEM_RATING_FC_TARGET_NUMERIC_RATING IS 0
DEFAULT_DATA_VALUE FOR HRA_EVAL_PROFILE_CONTENT_RATING_FC_NUMERIC_RATING IS 0
DEFAULT_DATA_VALUE FOR HRA_EVAL_PROFILE_CONTENT_RATING_FC_TARGET_NUMERIC_RATING IS 0
DEFAULT_DATA_VALUE FOR HRT_RATING_LEVEL_NUMERIC_RATING IS 'XXX'
DEFAULT_DATA_VALUE FOR HRT_PERSON_PRFRAT_NUMERIC_RATING IS 'XXX'
/*DEFAULT_DATA_VALUE FOR HRA_SECTION_RATING_FF_NUMERIC_RATING IS 0*/
/*================DEFAULT SECTION ENDS============================*/
/*================ FORMULA SECTION BEGINS =======================*/
L_RETURN_VALUE = 0
j= 1
while HRA_EVAL_COMP_RATING_FC_CONTENT_ITEM_CODE.EXISTS(j) LOOP
(
L_RETURN_VALUE = HRA_EVAL_ITEM_RATING_FC_TARGET_NUMERIC_RATING[j]) + L_RETURN_VALUE*/
j = j+1
)
/*================ FORMULA SECTION ENDS =======================*/
RETURN L_RETURN_VALUE
I do not know how the talent allows to debug a FF that is executed from their page. Please check with Talent Team.
DeleteThe DBI uses 2 context
EVAL_PARTICIPANT_ID
EVALUATION_ID
Please make sure the contexts are set right.
If you can debug the FF, print the, value of the context (get_context) , count of the DBI and the return value.
I do not know much about the Talent. If you can run same ff through ESS (if the option available) you can use ESS_LOG_WRITE function to write the log in ESS.
Otherwise you can use the function debug to log the message. For this debug function, you must turn on the trace.
Hope this helps.
Hi,
DeleteIn the fusion cloud we cannot access anything from back end.We can't run the fast formula back end level.did u have any sample fast formula for Comptency ratings calculation on performance templates.
No Sir, I never done any Competency ratings calculation on performance templates formula.
DeleteYou may not access anything from backend in fusion cloud but still you can run SQL. I am not expecting you run the formula from backend.
When I say Debug, it means creating log files.
Hi TK, How do we run SQL in fusion Cloud ?
DeleteThanks,
AS
is this question is related to Fast Formula ? if so, no you can not run sql within Fast Formula.
DeleteIf it is general question, then you can use BIP (Report) to run the sql.
Hi Tilak, Very informative
ReplyDeleteFrom where we can find route for DBIs?
Thanks
Saurabh
hi,
DeleteI am not sure whether I am allowed to disclose the technical structure. All I can say is, it is in routes table , it is connected to dbi through user entities.
Thanks Tilak and Laxmi for the wonderful blog on fast formula. Very Informative and useful.
ReplyDeleteHi Tilak annd Lakshmi,
ReplyDeleteThanks for sharing info. I tried to use ess_log_writes. But i am not able to know the location where to see the log files. I am using below fast formula for compensation with type "Participation and Eligibility". Can you let me know the location of ess log files for benefits and compensation. Thanks..
/*******************************************************************
FORMULA NAME: CPIC_COMP_ELIGIBILITY_FF
FORMULA TYPE: Participation and Rate Eligibility
DESCRIPTION: Compensation Eligibility Formula to select/deselect emp based on final warning status within 6 months -9/11/17
Author : Raja
Date : 18-SEP-2017
*******************************************************************/
DEFAULT FOR ln_assignment_id IS 0
DEFAULT FOR ld_effective_date IS '4712/12/31 00:00:00' (date)
DEFAULT FOR ln_person_id IS 0
DEFAULT_DATA_VALUE FOR PER_PERSON_EIT_ALL_PEI_ATTRIBUTE5 IS ' '
DEFAULT FOR PER_PER_PERSON_NUMBER IS 'XYZ'
DEFAULT_DATA_VALUE FOR PER_PERSON_EIT_ALL_PERSON_ID IS 0
DEFAULT_DATA_VALUE FOR PER_PERSON_EIT_ALL_PERSON_EXTRA_INFO_ID IS 0
DEFAULT_DATA_VALUE FOR PER_PERSON_EIT_ALL_INFORMATION_TYPE IS 'XYZ'
DEFAULT_DATA_VALUE FOR PER_PERSON_EIT_ALL_PEI_INFORMATION4 IS 'XYZ'
DEFAULT_DATA_VALUE FOR PER_PERSON_EIT_ALL_PEI_INFORMATION_DATE1 IS '1951/01/01 00:00:00' (date)
/*================== DEFAULTS END ============================*/
/*=========== INPUT VALUES DEFAULTS BEGIN ======================*/
Inputs are l_effective_date(date),
l_assignment_id
/*================= INPUT VALUES ENDS =========================*/
/*================ FORMULA SECTION BEGIN =======================*/
ln_assignment_id = get_context(HR_ASSIGNMENT_ID, -1 )
ld_effective_date = get_context(effective_date,'4712/12/31 00:00:00' (date))
ln_person_id = get_context (person_id, 0 )
l_per_number = PER_PER_PERSON_NUMBER
ELIGIBLE = 'Y'
/* 300000006249468 Beall Charles */
l_log_data = ess_log_write('Testing personnumber '||l_per_number)
If (ln_assignment_id = 300000006249468 ) OR l_per_number = '3312' THEN
(
ELIGIBLE = 'N'
)
else
(
i=1
while PER_PERSON_EIT_ALL_PERSON_ID.exists(i) loop
(
l_info_type = 'XYZ'
l_info_type = PER_PERSON_EIT_ALL_INFORMATION_TYPE[i]
l_person_id = 0
l_person_id=PER_PERSON_EIT_ALL_PERSON_ID[i]
l_person_extra_info_id = PER_PERSON_EIT_ALL_PERSON_EXTRA_INFO_ID[i]
l_info_4 = PER_PERSON_EIT_ALL_PEI_INFORMATION4[i]
l_info_date_1 = '1951/01/01 00:00:00' (date)
l_info_date_1 = PER_PERSON_EIT_ALL_PEI_INFORMATION_DATE1[i]
/*
l_gap_months = months_between(l_merit_cycle_date, l_info_date_1)
*/
IF (l_info_type = 'Corrective Action'
/*
AND l_info_4 = 'Final Written Warning' */
)
THEN
(
l_log_data = ess_log_write('Corrective Action for personnumber '||l_per_number)
ELIGIBILE ='N'
)
i=i+1
)
)
RETURN ELIGIBLE
Regards,
Raja
Have you looked at my blog, How to debug a Fast Formula,http://tilak-lakshmi.blogspot.com/2017/03/how-to-debug-fast-formula.html.
DeleteIt is explained in detail, if you have not understood, pls let me know.
Sir, this page does not exist
Deletehttps://tilak-lakshmi.blogspot.com/2017/03/how-to-debug-fast-formula.html
Delete(2017/march)
Hi Tilak,
ReplyDeleteThanks for the great knowledge sharing.
I need your help how to set_contexts twice in a fast formula for a same function.
Function Name:- GET_ACCRUAL_BALANCE
This formula function can be used to return the accrual balance of an absence plan calculated up until the latest ‘Last Balance Calculation Date’ for an enrollment which is active as of the effective date.
Mandatory Contexts:
• HR_ASSIGNMENT_ID
• PERSON_ID
• EFFECTIVE_DATE
• ACCRUAL_PLAN_ID
Data returned: The accrual balance in Number format.
I want to use this function twice in a Fast formula, set accrual plan ID 1 and function return value as f1
and set set accrual plan ID 2 return value as f2
return f2-f1;
Thanks in Advance
Subbu
This comment has been removed by the author.
ReplyDeleteHi Tilak and Lakshmi,
ReplyDeleteI need a help on set_contexts.
What is the syntax for set contexts? with example.
I want to use this function in my fast formula
GET_ACCRUAL_BALANCE
This formula function can be used to return the accrual balance of an absence plan calculated up until the latest ‘Last Balance Calculation Date’ for an enrollment which is active as of the effective date.
Mandatory Contexts:
• HR_ASSIGNMENT_ID
• PERSON_ID
• EFFECTIVE_DATE
• ACCRUAL_PLAN_ID
Data returned: The accrual balance in Number format.
How to set these context in fast formula? Can i assign two different values for set_context?
Example for my requirement
Set context values
v1 = GET_ACCRUAL_BALANCE
set context values (here we have different accrual_plan_id)
v2= GET_ACCRUAL_BALANCE
return v2-v1;
Thanks in Advance
Subbu
Hi Subbu,
ReplyDeletePlease find the example below:
/* Setting the contexts for getting accrual and plan balances */
L_ACCRUAL_PLAN_ID = GET_CONTEXT(ACCRUAL_PLAN_ID,0)
L_ASSIGNMENT_ID = GET_CONTEXT(HR_TERM_ID,0)
L_ASSIGNMENT_ID2 = GET_CONTEXT(HR_ASSIGNMENT_ID,0)
L_LEGISLATIVE_DATA_GROUP_ID = GET_CONTEXT(LEGISLATIVE_DATA_GROUP_ID,0)
L_ABSENCE_TYPE_ID = GET_CONTEXT(ABSENCE_TYPE_ID,0)
/* Initializing the balance fields */
L_sys_16_Balance = 0
L_sys_Balance = 0
L_Accruals = 0
L_Leave_Balance = 0
/* Getting the accrual balance as of sysdate. GET_ACCRUAL_BALANCE function will return balance as of the last calculation date only. It can't get history balance values */
CHANGE_CONTEXTS(ACCRUAL_PLAN_ID = L_ACCRUAL_PLAN_ID, HR_ASSIGNMENT_ID = L_ASSIGNMENT_ID, PERSON_ID = L_PERSON_ID, EFFECTIVE_DATE = L_SYSDATE)
(
L_sys_Balance = GET_ACCRUAL_BALANCE()
)
Hi Anil,
DeleteThanks for the quick reply.
Hope it will resolve my issue. Will come back with status
Hi Anil, Subbu,
DeleteThe change_context is one of the most miss-used and miss-understood concept of fast formula. Thinking of writing a detail blog on it.
The example given by Anil is perfect.
The function, GET_ACCRUAL_BALANCE uses the following contexts.
Person_Id,
HR_Assignment_Id,
Accrual_Plan_Id and
Effctive_date.
Assume the person_id and assignment_id may not change and the possible changes are plan_id and effective date. In this case you need to change the contexts of the changed values only.
By setting the context of person and assignment many not have any impact functionally but it is a overkill.
CHANGE_CONTEXTS(ACCRUAL_PLAN_ID = L_ACCRUAL_PLAN_ID, EFFECTIVE_DATE = L_SYSDATE)
(
L_sys_Balance = GET_ACCRUAL_BALANCE
)
Hi Anil,Tilak and Lakshmi,
DeleteThanks for your great support.
Struck with few issues to implement the above requirement.
How to write the code for "sysdate minus one day"?
I tried GET_DATE('SYSDATE') -1 and it was failed with error "Dfferent type of attributes used"
How to get the log messages in Absence management?
I tried from your blog for the log messages, Actually it worked well in OTL, failing in Absence management.
Thanks in Adavance
Subbu
Hi Subbu,
ReplyDeleteI am not sure whether that is the approach to get sysdate, I wrote this in my fastformula to fetch sysdate.
this dbi will fetch sysdate of the system GLOBAL_PAY_INTERFACE_EXTRACTION_DATE.
Hope this helps to fetch SYSDATE.
L_SYSDATE = to_date(to_char(trunc(GLOBAL_PAY_INTERFACE_EXTRACTION_DATE),'YYYY/MM/DD') || '00:00:01')
L_NEXT_DATE = add_days(L_SYSDATE,1)
will provide you the output required.
Thanks,
Anil
Thanks for the quick reply Anil :).
DeleteThank you Anil.
DeleteGLOBAL_PAY_INTERFACE_EXTRACTION_DATE returns sysdate in YYYYMMDD format as text.
Global_Pay_Interface_Extraction_Time returns sysdate in HHMMSS format as text.
for your requirement
L_SYSDATE = GLOBAL_PAY_INTERFACE_EXTRACTION_DATE
l_v = ESS_LOG_WRITE('SYSDATE: ' + L_SYSDATE)
L_YESTERDAY = add_days(to_date(L_SYSDATE, 'YYYYMMDD') , -1)
l_v = ESS_LOG_WRITE('?YESTERDAY : ' + TO_CHAR(L_YESTERDAY))
should work.
please lt us know if is not working as you expected.
Hi All,
ReplyDeletein my extract am using "PER_ASSIGNMENT_EIT_ALL_CONTEXT_UE" here in AEI_ATTRIBUTE1 we are fetching the one other employee person_number who is not at all related to Assignment_EIT person. but i want to fetch that AEI_ATTRIBUTE1 person's name.
In my fast formula am using DBI's of "PER_PER_PERSON_DETAILS_UE" here Context is Person_id so when am running the extracts "PER_ASSIGNMENT_EIT_ALL_CONTEXT_UE" person_id will bind to "PER_PER_PERSON_DETAILS_UE" so...How can i get the AEI_ATTIBUTE1's Person's full name.
I am not sure I understood your question right. I assume you want to extract a different persons's AEI_ATTRIBUTE1 than the one in current context.
DeleteYou can change the FF to change the context. The AEI attribute uses HR_ASSIGNMENT_ID Context. change that to the assignment id (hope u have the data while ff is executed) you want.
hi Tilak and Lakshmi,
ReplyDeleteI am new to fast formulas, I would like to know how i can view all the contexts available in fusion HCM and also what data they bring into the formula. Kind of like a documentation of all contexts.
There is no page to view the contexts. If you know the table structures of Fast Formula, you can easily find the table (I am not sure, I can disclose the tables).
DeleteThe default context values are passed by the oracle developer. You do not have any control over there. The Formula document describes it.
All you can do is that you can change the context values in the Formula provided the context is supported by the formula type.
Hi Tilak and Lakshmi,
ReplyDeleteI have a situation where I need to create Fast Formula for information element can you advise
what is the question here?. Fast formula is used by more than 5 products and many types.
DeleteI want to have the date from the fast formula when did the employee has started working on a new position and its not like that client can start the new position of the employees only on promotion or demotion they can do it on any action code. can anyone answer this
ReplyDeleteThere are few DBI, i am not sure what kind of fast formula you want t use:
DeletePAY_ASG_POSITION_START_DATE ( make sure your ff type supports pay asg id as context)
Other option you can took into seniority module: https://tilak-lakshmi.blogspot.com/2018/08/grade-steps-progressions-gsp-fast_9.html.
Other option is, PER_POSITION_SECURED_LIST_V but it get you all the position you need to filter it for your need.
Let me know which one works for you
Thank you :-)
DeleteCan you Please give the Logic for the above requirement.
DeleteAll the logics are already explained in different session of my blogs.
DeleteI am willing to help if you have a specific question.
Hi,
ReplyDeleteI want to a FF fro the below requirment. Accural Mtarix.
This is to figure out what FMLA max hours should be per year, for each employee. WE would like to base it off the assignment categories. For your review, the assignment categories currently or to used in Prod is g Can you give me the FMLA hours to the different categories
Full-time regular
Full-time temporary
Part Time - 14
Part Time - 29
Part Time - 39
Part-time regular
Part-time temporary
Hi Tilak,
ReplyDeleteI am new to Oracle Fusion HCM Fast Formula. I have a requirement to get working days of an employee from Time and Labour Module. If employee has worked for 20 days, he is eligible for a Privileged Leave.This I have to accomplish in Absence using Fast Formula.
If you setup a balance to calculate the working days, the balance will create DBI for formula and you can use the DBI to get the values.
DeleteThanks for your reply! Need Fast Formula.
DeleteHi Tilak and Lakshmi,
ReplyDeleteFirst of all thanks for this helpfull information.
We have a requirement whenever I hire an employee the basic salary should auto-populate depending upon the employee's assignment grade and respective grade step.
For Example, consider the below table.
Grade Name
Step Name
Amount SAR
Grade 1
Step 0
101
Step 1
102
Step 2
103
Step 3
104
Step 4
105
Step 5
106
Step 6
107
Step 7
108
Case 1. If I hire an employee and assigned grade 1 and step 0 then that employee basic salary should auto-populate as SAR 101.
Case 2. If I promote an employee from step 1 to step 2 then that employees basic should automatically change from SAR 102 to SAR 103.
Please suggest.
is it not how GSP behaves?. What is the question here?
DeleteAll i see is your requirement not the question.
My requirement is like Case 1. If I hire an employee and assigned grade 1 and step 0 then that employee basic salary should auto-populate as SAR 101.
DeleteCase 2. If I promote an employee from step 1 to step 2 then that employees basic should automatically change from SAR 102 to SAR 103.
How to achieve this requirement is my question.
Hi Team,
ReplyDeleteRecently i have attended an interview and I came across with one question like why the DBI's are different for each different type of formula like; COMP, BEN..like.... Could you advise the answer with little more details...
The question itself is bit tricky.
DeleteThough the data comes from different modules like COMP or BEN, the Formula Types support the DBI depends on the context that are supported by the formula type.
As long as the context matches/supported you can use any DBI from any product in FF.
I believe COMP can use some of the DBI from BEN though most of the DBI needs Business Group ID context which is not supported by COMP. Please see my blog for more information on BEN and COMP formulas support.
Hope this helps
Hi Tilak,
ReplyDeleteOne small query how to access time entries(i.e Time cards - Start time ,end Time and Hours) in payroll fast formula.
Based on shift employee works need to pay additional Pay.
it is not simple to explain how you can achieve that. Time and labour uses unique context which may not be supported by payroll. Please talk to Oracle support.
Deletehi
ReplyDeletevery useful blog ....
ReplyDeleteHello,
ReplyDeletePerhaps you may help with the following:
We are trying to get 2 rules to be trigger for a life event, as follows:
Rule 1- Increase of Hours and regular:
This rule should find a person:
a- That has an increase in hours from less than 30 to 30 or more and that is “Part time regular” or Full Time Regular”
b- or a person that moves to “Full time regular” or “Part time regular” from “CASUAL”, or “Part Time Temporary” or “Full Time Temporary” and works 30 hours or more
c- or a person that moves to “Full time regular” or “Part time regular” from “CASUAL”, or “Part Time Temporary” or “Full Time Temporary” and has an increase in hours from less than 30 to 30.
Rule 2- Decrease of Hours and temporary:
This rule should find a person:
a- That has a decrease in hours from 30 or more to less than 30
b- Or moves to “CASUAL”, or “Part Time Temporary” or “Full Time Temporary” from “Full time regular” or “Part time regular”.
Thank you and regards
That is your Benefit Functional requirement. What is your question in Fast Formula ?
DeleteHi , thank you. My question is how to write the fast formula for the requirements above?
DeleteWhat is the formula type are you looking for? and what have you done so far?.
ReplyDeleteHi Tilak and Lakshmi,
ReplyDeletei am writing a formula for disburse balance where i need to reflect the MAX value as " addition of (absence plan1 + absence plan2)
formula is not working for addition: MAX = ((GET_PLAN_BALANCE(l_plan_name1)) + (GET_PLAN_BALANCE(l_plan_name2)))
but working fine for subtraction or when combination of value is lesser than the system defaulted disburse value.
formula: DEFAULT for IV_CALEDARENDDATE is '4712/12/31 00:00:00' (date)
DEFAULT for L_Eff_Dt is '4712/12/31 00:00:00' (date)
DEFAULT for l_plan_name is 'A'
DEFAULT for l_term_id is 0
DEFAULT for l_ldg_ID is 0
DEFAULT for L_Leave_Balance is 0
DEFAULT FOR L_Person_Id IS 0
Inputs are L_Eff_Dt(date),l_term_id
L_Eff_Dt = get_context(effective_date,'4712/12/31 00:00:00' (date))
l_plan_name1 = 'Absence1'
l_plan_name2 = 'Absence2'
l_ldg_ID = GET_CONTEXT(LEGISLATIVE_DATA_GROUP_ID,0)
L_Person_Id= get_context (person_id, 0 )
l_term_id=GET_CONTEXT(HR_ASSIGNMENT_ID,0)
CHANGE_CONTEXTS(HR_ASSIGNMENT_ID = l_term_id,PERSON_ID = L_Person_Id,EFFECTIVE_DATE =L_Eff_Dt,LEGISLATIVE_DATA_GROUP_ID=l_ldg_ID)
(
MAX = ((GET_PLAN_BALANCE(Absence1)) + (GET_PLAN_BALANCE(Absence2)))
)
MIN= 1
INCREMENT=1
RETURN MIN,MAX,INCREMENT
screenshot:
l_plan_name1 ='Absence1'(balance=31.520)
l_plan_name2 ='Absence2' (balance=30.118)
MAX = ((GET_PLAN_BALANCE(Absence1)) - (GET_PLAN_BALANCE(Absence2)))
Its working fine when MAX value is lesser than disburse value (30.118 days)
Disburse balance:
Plan: Absence1
*Date:
Balance: 30.118 days
Disbursement Amount:_______ days
You need to enter a value between 1 and 1.402 for the field Disbursement Amount. The value must be in increments of 1, and can't be zero. For example, to enter a value between 8 and 40, in increments of 8, you enter any of these values: 8, 16, 24, 32, or 40.
MAX = ((GET_PLAN_BALANCE(Absence1)) + (GET_PLAN_BALANCE(Absence2)))
Its not working when MAX value is higher than disburse value (30.118 days)
Disburse balance:
Plan: Absence1
*Date:
Balance: 30.118 days
Disbursement Amount:_______ days
You need to enter a value between 1 and 30.118 for the field Disbursement Amount. The value must be in increments of 1, and can't be zero. For example, to enter a value between 8 and 40, in increments of 8, you enter any of these values: 8, 16, 24, 32, or 40.
I am not well versed with absence.
ReplyDeleteMy simple question is is what is not working? What are you expecting and what are you getting ( there is nothing called "it is not working").
Why are you using any debug/log to see what is goin on ?
can you plz provide me any alternative function to override the system generated default value which is restricting my formula calculation like in below example:
ReplyDeleteMAX = ((GET_PLAN_BALANCE(Absence1)) + (GET_PLAN_BALANCE(Absence2)))
formula is getting restricted when "MAX value" is higher than system generated defaulted disburse value (30.118 days)
Disburse balance page screenshot:
Plan: Absence1
*Date:________
Balance: 30.118 days
Disbursement Amount:_______ days
system generated message at disburse page: You need to enter a value between 1 and 30.118 for the field Disbursement Amount. The value must be in increments of 1, and can't be zero. For example, to enter a value between 8 and 40, in increments of 8, you enter any of these values: 8, 16, 24, 32, or 40.
Please let me know if you need any other information
Hi, I would like to seek help in doing a skip rule. The condition is when the employee in LOA(Leave of absence), it will skip the computation/process of the fast formula.
ReplyDeleteHi - thank you for this blog - really insightful.
ReplyDeleteI am planning to use FFs for a creative solution but not sure if thats possible and wanted to check with experts before this.
We need to pre-populate some DFFs as part of annual appraisal performance document with some ratings from talent profile - is that doable? ANd also once these DFFs are submitted and performance document closed - we need to copy these values in talent profile ratings. ANy idea if Fast Formulas can help with this?
Thanks for sharing this great information I am impressed by the information that you have on this blog. Same as your blog i found another one Oracle APEX. Actually I was looking for the same information on internet for Oracle APEX Tutorial and came across your blog. I am impressed by the information that you have on this blog. It shows how well you understand this subject, you can learn more aboutOracle Apex. By attending Oracle APEX Training
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteHI
ReplyDeleteI want to fetch manager person numeber and match it with the code mentioned in look up. But the below code (PER_ASG_MGR_MANAGER_TYPE DBI) is fetching only 'LINE_MANAGER'. Can you please suggest.I am calling this ff in HCM extract
DEFAULT FOR PER_ASG_MGR_MANAGER_ID IS 0
DEFAULT FOR PER_PER_PERSON_NUMBER IS ' '
DEFAULT FOR PER_PER_BASIC_ATTRIBUTE_TEXT1 IS ' '
DEFAULT FOR PER_HCM_LOOKUPS_MEANING IS ' '
DEFAULT FOR PER_ASG_MGR_MANAGER_TYPE IS ' '
/*=========== DATABASE ITEM DEFAULTS END ================*/
/*=========== FORMULA SECTION BEGIN =====================*/
RULE_VALUE = ' '
l_person_number = 'x'
IF PER_ASG_MGR_MANAGER_TYPE = 'HRBP' THEN
?*IF PER_ASG_MGR_MANAGER_TYPE = 'LINE_MANAGER'*/ THEN
(
CHANGE_CONTEXTS(PERSON_ID = PER_ASG_MGR_MANAGER_ID)
(
l_person_number = PER_PER_PERSON_NUMBER
)
CHANGE_CONTEXTS(LOOKUP_TYPE ='MGR_NUMBER', LOOKUP_CODE =l_person_number )
(
IF PER_HCM_LOOKUPS_MEANING WAS NOT DEFAULTED THEN RULE_VALUE = PER_HCM_LOOKUPS_MEANING
/*ELSE
(
CHANGE_CONTEXTS(PERSON_ID = PER_ASG_MGR_MANAGER_ID)
(
RULE_VALUE = PER_PER_PERSON_NUMBER
IF PER_PER_BASIC_ATTRIBUTE_TEXT1 WAS NOT DEFAULTED THEN
RULE_VALUE = PER_PER_BASIC_ATTRIBUTE_TEXT1
)
)*/
)
)
RETURN RULE_VALUE
/*=========== FORMULA SECTION END =====================*/
PER_ASG_MGR_PERSON_NUMBER
DeleteHi Titli,
ReplyDeleteThanks for sharing the details. May you please help understand when to use get_context or set_context with an example. I m still not clear on that part. I know when to use change_context but get and set real time scenarios I have not understood. Get_context(assignment_id,0) will it always return the most recent assignment id of an employee. And why will I need to set a context and what it exactly mean is something I m still confused with.
Thanks in advance.
Thanks and Regards
Ankisha
SET_CONTEXT was a typo, please read as change_contexts. Get context, get the value of the context, if the context was not having any value then the default ( second parameter) will be returned.
DeleteThe context is set by the developer when the formula is executed. The context value us set only when the contexts is used in the formula. Most of the time it is as of effective date value, not necessarily a current value.
When You need to read the value from context or you want to make sure context is passed in the formula where it is not used but the child formula is using the context needs to use the get_context.
Hope this explains.
Hi tilak,
ReplyDeleteGood morning
Please help me to write a compensation default and override to display person external identifier
Thanks for the help in advance.
If you have any specific question, i will do my best to to help you. I can not help such a broad question.
Delete1. When the user goes and re-submit the timecard (approved / not approved) the comment becomes mandatory.
ReplyDelete2. Make the comments mandatory only for the lines that are changed while resubmit, rather than all lines.
Req#1 is working and have tested as per below
Entered a new time card> Submitted
Entered a new time card> Submitted > Approved
The comments are made mandatory for every line on the time card
Req#2 Unable to get through second requirement: is there a way could we read existing per day time detail value of the timecard and then compare the values with tc_measure value (entered value on the screen while resubmit)
Hi Tilak Sir,
ReplyDeleteFor above Req#2:
In Time entry rules Fast Formula:
Can I use below DBI's to read existing per day time detail values
HWM_PPM_TM_MEASURE
HWM_PPM_TM_RESOURCE_ID
HWM_PPM_TM_START_TIME
HWM_PPM_TM_STOP_TIME
and then compare DB values with TC_MEASURE value that is entered on the time card screen while RESUBMIT ?
I am trying above but unable to get the results.
can experts comment on my approach please ?
Thanks,
Nagesh
Hi all
ReplyDeleteI am working recruiting fast formulas.
Anybody has reference material
Hi all,
ReplyDeleteCan we send payroll. Period end date as effective_date context to "payroll access to hr ff type" through set_input from another element's status processing formula... I need ot for some contact validation.
Regards,
Navya
Yes you can set the context by set_input for calling child formula or change_context within the same formula
Delete