You are on page 1of 3

Execute SQL Query in Fast Formula or Get Value Set Value in Fast

Formula

Database Items are limited for any kind of Fast Formula.


Apart from Oracle offered database items, we are not able
to get the values.
For this kind of values which are not able to get by using
database items, we can get it by executing query using
table type value set.

Requirement:

Check Element Entry Value on Particular Effective Date.

Solution:

Step 1:
Create Table Type value set with query which needed to be
executed from Fast Formula.
Where Clause:
Parameter which needed to pass from fast formula should
be in “: {PARAMETER.PARAMETER_NAME}”
i.e.,
PEEF.person_id=: {PARAMETER.PERSON_ID}
AND PEEF.ELEMENT_TYPE_ID in
(300000001208613,300000001344773)
AND to_date(:{PARAMETER.EFF_DATE},'YYYY/MM/
DD') BETWEEN PEEF.EFFECTIVE_START_DATE AND
PEEF.EFFECTIVE_END_DATE

Step 2: Fast Formula Code to get the value from the query
l_element_entry_exists =
GET_VALUE_SET('ADIB_HOUSING_ELEMENT_EXIST','
|=PERSON_ID='''||L_Person_Id_char||''''||'|EFF_DATE='''||
l_effective_date1||'''')

Limitation:

Value set is not bringing proper value in Fast Formula, if query is


exceeding certain amount of characters.

Thanks a lot,

Feras Hamdan

You might also like