Fast Formula is language to write formula using English word and basic mathematics functions to perform calculation or comparison.
Section of Fast formula :
1. Alias Section (Optional)
2. Default Section
3. Inputs Section
4. Calculation Section
5. Comments
6. Return Section
Create sample Fast formula for absence.
Search for Fast formula task from setup and maintenance
click on continue after entering details
This will check if leave applied duration is greater than 5 then it will show error ‘DURATION IS GREATER THAN 5’
====================================
Code :
/**********************************
Formula Name : Annual Leave Fast Formula Demo
Formula Type : Global Absence Entry Validation
***********************************/
INPUTS ARE
IV_START_DATE,
IV_END_DATE,
IV_TOTALDURATION
VALID='Y'
IF IV_TOTALDURATION> 5 THEN
(
VALID ='N'
ERROR_MESSAGE = 'DURATION IS GREATER THAN 5'
)
RETURN VALID, ERROR_MESSAGE
==================================
Save, Submit and then compile
Now attached Fast formula to Absence Type ‘Annual Leave AU’
as this absence type is assigned to employee
Add Fast Formula at validation formula
Apply leave for period which total days will be greater
than 5
After entering comments and reason submit absence
It will apply our fast formula while validating this absence records and show error
No comments:
Post a Comment