Using Profiles DBI in Fast Formula

Profiles DBI can be reported using HRT_PERSON_GENERIC_CONTENT_TYPE_UE.

You can access the DBI associated with this UE only in the formula type: Generic Formula for Profile Content (HRT_PROFILE_GENERIC_FORMULA_TYPE)

Set these Contexts to create a fast formula using the HRT_PERSON_GENERIC_CONTENT_TYPE_** DBIs.
  • EFFECTIVE_DATE

  • PERSON_ID

  • TALENT_PROFILE_CONTENT_TYPE

Any another formula type which also sets these three Contexts will be able to check the DBI items from the above UE. However among the seeded Formula Types only the Generic Formula for Profile Content requires these 3 contexts. Hence currently we can only use the this Formula Type for formulas based on the Profiles DBIs (HRT_PERSON_GENERIC_CONTENT_TYPE_** , .e.g. HRT_PERSON_GENERIC_CONTENT_TYPE_ITEM_TEXT240_1).

In case you require these DBIs in other formula types, call the Profile formula from within your own Formula (it can be another type e.g. Compensation Default and Override). However you need to set all the required CONTEXTS.

Note: If you are using Enhanced Talent Profiles, when you use the context TALENT_PROFILE_CONTENT_TYPE, you will see data for all the sections that are associated with your specific content type or template. You must loop through the data retrieved and use the attribute SECTION_CONTEXT to find the specific profile section data you are looking for.
Use Profiles DBI in Fast Formula by following these steps:
  1. Create a new Fast Formula of the formula type "Generic Formula type for Profile Content".

  2. Set the context values: Person Id, Effective Date and TALENT_PROFILE_CONTENT_TYPE. Include the DBI values customer to be used in Compensation Fast Formula in the return statement like HRT_PERSON_GENERIC_CONTENT_TYPE_ITEM_TEXT240_1 etc...

  3. Use the above created Fast Formula in Compensation Formula "Default and Override". Set the context values (Person Id, Effective Date and TALENT_PROFILE_CONTENT_TYPE) for the above Profiles Fast Formula created in Step1 before calling the Profiles Fast Formula.

  4. Reference the Profiles Fast Formula from Compensation Fast Formula to get the values present in the Return statement of Profiles Fast Formula.

  5. Use these Return values in the Compensation Fast Formula.

Example 1: Simple implementation to return the number of Competency items

1. Formula compiled for "Compensation default and override" type:

Sample Formula name: "Sr Test Two"

Sample Formula text:
/*------------------------------------------------*/
L_DATA_TYPE = 'TEXT'
L_DEFAULT_VALUE = '111'
L_PERSON_ID = get_context(person_id, -1)
IF (IS_EXECUTABLE('SR_FORMULA_GENERIC_TWO')) THEN
(
SET_INPUT('PERSON_ID', L_PERSON_ID)
SET_INPUT('TALENT_PROFILE_CONTENT_TYPE', 'COMPETENCY')
EXECUTE('SR_FORMULA_GENERIC_TWO')
)
ELSE(
L_DATA =ESS_LOG_WRITE('SR_FORMULA_GENERIC_TWO is not executable')
)
L_DEFAULT_VALUE = GET_OUTPUT('L_RETURN_VALUE_FROM_PROFILE','NULL')
RETURN L_DATA_TYPE,L_DEFAULT_VALUE
/*------------------------------------------------*/

2. Formula compiled for "Generic Formula type for Profile Content" type:

Sample Formula name: "SR_FORMULA_GENERIC_TWO”

Sample Formula text:
/*------------------------------------------------*/
DEFAULT_DATA_VALUE FOR HRT_PERSON_GENERIC_CONTENT_TYPE_ITEM_TEXT240_1 IS 'NULL'
DEFAULT_DATA_VALUE FOR HRT_PERSON_GENERIC_CONTENT_TYPE_ITEM_TEXT240_2 IS 'NULL'
I=1
L_RETURN_VALUE_FROM_PROFILE = '111'
WHILE HRT_PERSON_GENERIC_CONTENT_TYPE_ITEM_TEXT240_1.EXISTS(I) LOOP
(
I= I+1
)
L_RETURN_VALUE_FROM_PROFILE = TO_CHAR(I)
RETURN L_RETURN_VALUE_FROM_PROFILE
/*------------------------------------------------*/

Example 2: Implementation to return the first Item_Text_240_1

Sample Formula name: "TPC_Override”

Sample Formula text:
/*------------------------------------------------*/
/* TPC_Override formula */
L_VALUE = 'NULL'
SET_INPUT('TALENT_PROFILE_CONTENT_TYPE','COMPETENCY')
L_PERSON_ID = get_context(person_id, -1)
SET_INPUT('PERSON_ID', L_PERSON_ID)
EXECUTE('TPC_Profile')
L_VALUE = GET_OUTPUT('ITEM2401', 'NA')
L_DATA =ESS_LOG_WRITE('TPC executed '||L_VALUE)
RETURN L_VALUE
/*------------------------------------------------*/

2. Formula compiled for "Generic Formula type for Profile Content" type:

Sample Formula name: TPC_Profile

Sample Formula text:
/*------------------------------------------------*/
/*TPC_Profile formula */ -- Generic Profile Content
/* DATABASE ITEM DEFAULTS BEGIN */
DEFAULT_DATA_VALUE FOR HRT_PERSON_GENERIC_CONTENT_TYPE_ITEM_TEXT240_1 IS 'NA'
/* DATABASE ITEM DEFAULTS END */
I = HRT_PERSON_GENERIC_CONTENT_TYPE_ITEM_TEXT240_1.FIRST(-1)
ITEM2401 = = HRT_PERSON_GENERIC_CONTENT_TYPE_ITEM_TEXT240_1[I]
return ITEM2401
/*------------------------------------------------*/