Element Input Validation Fast Formula Type
Element Input Validation
This can be used when we got to validate / restrict the element input value (Date/Number). There various types through which we can enable restriction. That are,
a) Fast Formula (Date/Money),
b) Lookup (Character),
c) Value Set,
d) Default Value,
e) Minimum & Maximum
In this article we are going to see how to restrict/validate entry values in element input value.
Scenario 1
Restrict the input value for a element called "One time Bonus" not higher than Rs: 15000 /-
Steps:
1) Write fast formula to validate / restrict desired entry value (Date/ Money) in element input value,
(Navigation: HRMS: -> Total Compensation -> Basic -> Write Formula)
1.1) Type Formula Name,
1.2) Select Type as "Element Input Validation",
1.3) Enter description for the fast formula.
2) Enter the following formula
Inputs are entry_value (text)
If to_num (entry_value) > 15000
Then
(Formula_Status = 'e'
Formula_Message = 'Value Entered is above the limit')
Else
(Formula_Status = 's'
Formula_Message = 'Fine')
Return Formula_Status, Formula_Message
3) Define an element,
(Navigation: HRMS -> Total Compensation -> Basic Element Description)
4) Enter input values for the element
4.1) Select "Money" in units,
4.2) Select the formula from the LOV in the formula field.
5) Testing: try entering values within & above 15000 in element entries
(Navigation: People -> Enter & Maintain -> "Assignment" -> Entries – Entry Values)
Scenario 2
Restrict Entry date not prior to system date (Can be Today & Tomorrow Onwards)
1) Wirte fast formula to validate element input date,
(Navigation: HRMS:-> Total Compensation -> Basic -> Write Formula)
1.1) Type Formula Name,
1.2) Select Type as "Element Input Validation",
1.3) Enter description for the fast formula.
2) Enter the following formula;
Default for session_date IS '1900/01/01 00:00:00' (date)
Inputs are entry_value(text)
If(to_date(entry_value,'YYYY/MM/DD HH24:MI:SS') < session_date) then
(formula_status ='e'
formula_message ='Enter future date')
else
(formula_status='s')
Return formula_status,formula_message
3) Define an element,
(Navigation: HRMS -> Total Compensation -> Basic Element Description)
4) Enter input values for the element
4.1) Select "Money" in units,
4.2) Select the formula from the LOV in the formula field.
5) Testing: try entering date less than, equal to & greater than the session date.
(Navigation: People -> Enter & Maintain -> "Assignment" -> Entries – Entry Values)
Some Fast Formula Tables: SQL Query to select tables:-
Select * from all_objects where object_type=’table’ and object_name like ‘ff%';
ff_functions
ff_function_parameters
ff_formulas_f
ff_formula_types
ff_database_items
ff_globals_ff
No comments:
Post a Comment