0% found this document useful (0 votes)
313 views

TABLE - VALUE in FUSION

The GET_TABLE_VALUE and HR_GET_TABLE_VALUE functions return default values instead of the expected values when called from a fast formula. This is because the row name passed to the function is the translated display name, not the internal base name needed by the function. The solution is to use the FF_USER_TABLES_PKG package to retrieve the correct internal row name value.

Uploaded by

Mugabe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
313 views

TABLE - VALUE in FUSION

The GET_TABLE_VALUE and HR_GET_TABLE_VALUE functions return default values instead of the expected values when called from a fast formula. This is because the row name passed to the function is the translated display name, not the internal base name needed by the function. The solution is to use the FF_USER_TABLES_PKG package to retrieve the correct internal row name value.

Uploaded by

Mugabe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

NOTE Doc ID 2471153.

1
GET_TABLE_VALUE and HR_GET_TABLE_VALUE Return No Values in Fast Formula

In an HMC extract accessing a UDT in a fast formula to find an email address.


Defined extract columns to contain the table, column and row names and pass these
to the fast formula. The formula uses these in a call to HR_GET_TABLE_VALUE, but
the default value is always returned. Tried changing contexts in the fast formula
to the LDG of the UDT and calling GET_TABLE_VALUE instead, but the results are the
same.

Formula is below:

DEFAULT FOR DATA_ELEMENTS IS EMPTY_TEXT_TEXT

INPUTS ARE DATA_ELEMENTS (TEXT_TEXT)

L_TABLE_NAME = DATA_ELEMENTS['TABLE_NAME']
L_ROW_NAME = DATA_ELEMENTS['ROW_NAME']
L_COLUMN_NAME = DATA_ELEMENTS['COLUMN_NAME']
L_OUTPUT_VAL = ' '

L_DATA = ess_log_write('TABLE_NAME ::'+L_TABLE_NAME )


L_DATA = ess_log_write('ROW_NAME ::'+L_ROW_NAME )
L_DATA = ess_log_write('COLUMN_NAME ::'+L_COLUMN_NAME)

CHANGE_CONTEXTS(ENTERPRISE_ID=1)
(
L_OUTPUT_VAL = HR_GET_TABLE_VALUE ( L_TABLE_NAME, L_COLUMN_NAME, L_ROW_NAME,
'N/A' )
)

L_DATA = ESS_LOG_WRITE( ' Return Value : '+L_OUTPUT_VAL)

rule_value = L_OUTPUT_VAL

RETURN rule_value

Logs show that the correct values are passed to the formula:

TABLE_NAME ::JF_EMAIL_LIST_TO_CLOUD
ROW_NAME ::CASS_NOTIFICATION_EXTRACT
COLUMN_NAME ::RECIPIENT
Return Value : N/A

This query returns the expected value:


--------------------------------------
SELECT value
FROM ff_user_column_instances_f
WHERE user_row_id IN (SELECT user_row_id
FROM ff_user_rows_vl
WHERE user_table_id IN (SELECT user_table_id
FROM ff_user_tables
WHERE base_user_table_name = 'JF_EMAIL_LIST_TO_CLOUD')
AND row_name = 'CASS_NOTIFICATION_EXTRACT')
AND user_column_id IN (SELECT user_column_id
FROM ff_user_columns
WHERE user_table_id IN (SELECT user_table_id
FROM ff_user_tables
WHERE base_user_table_name = 'JF_EMAIL_LIST_TO_CLOUD')
AND BASE_USER_COLUMN_NAME = 'RECIPIENT');

CAUSE
------
The values for the GET_TABLE_VALUE call are:

BASE_USER_TABLE_NAME - table name


BASE_USER_COLUMN_NAME - column name
ROW_LOW_RANGE_OR_NUMBER - row name

In this instance, the row name has the problem. There is no ROW_LOW_RANGE_OR_NUMBER
value which is passed to the fomrula. When values are updated from the User
Interface (UI), the base / internal value is not changed e.g.
ROW_LOW_RANGE_OR_NUMBER, only the translated / display value is changed e.g.
ROW_NAME. This is the standard implementation.

SOLUTION
*********

Use the following query:

select ff_user_tables_pkg.get_table_value(NNNNNNNNNNNNNNNNNN, to_date('2018-11-05',


'YYYY-MM-DD'), 'JF_EMAIL_LIST_TO_CLOUD', 'RECIPIENT', 'CASS_NOTIFICATION_EXTRACT',
'N/A')
from dual;

Also, the following query:

select u.base_user_table_name
, u.user_table_name
, u.range_or_match
, u.user_key_units
, c.base_user_column_name
, c.user_column_name
, c.data_type
, r.row_low_range_or_name
, r.row_name
, to_char(r.effective_start_date, 'YYYY-MM-DD') esd
, to_char(r.effective_end_date, 'YYYY-MM-DD') eed
, r.row_high_range
, to_char(uci.effective_start_date, 'YYYY-MM-DD') uci_esd
, to_char(uci.effective_end_date, 'YYYY-MM-DD') uci_eed
from ff_user_tables_vl u
, ff_user_columns_vl c
, ff_user_rows_vl r
, ff_user_column_instances_f uci
where u.base_user_table_name = 'YOUR UDT'
and u.legislative_data_group_id = NNNNNNNNNNNNNNNNN
and c.user_table_id = u.user_table_id
and r.user_table_id = u.user_table_id
and uci.user_column_id = c.user_column_id
and uci.user_row_id = r.user_row_id
and (r.effective_start_date between
uci.effective_start_date and uci.effective_end_date or
r.effective_end_date between
uci.effective_start_date and uci.effective_end_date);

You might also like