You are on page 1of 9

Step 1.

Run query in BI publisher to find the ABSENCE_PLAN_ID for Absence type that will be selected on
Manage Absence records page.

SELECT A.absence_type_id

FROM anc_absence_types_f A

,anc_absence_types_f_tl B

WHERE A.legislation_code = 'US'

AND B.name = Ali Military '

AND sysdate BETWEEN A.effective_start_date AND A.effective_end_date

AND sysdate BETWEEN B.effective_start_date AND B.effective_end_date

AND A.absence_type_id = B.absence_type_id

AND B.language = 'US'

Output:

Plan ABSENCE_PLAN_ID

Ali Military 300000012787668

Ali Planned End Date Type 300000106791904 – we are picking this for our test below.

DM Generic Abscense 300000113828974

Step 2.

Go to Manage Descriptive FlexFields task, Absence Recordings DFF

Context Segment on ANC_PER_ABS_ENTRIES_DFF should be defined as follows

Default type as Parameter


Default value as AbsenceType
Derivation value as AbsenceType
Click Manage Contexts on above page

Step 3.

Create context AND context segment as shown below:

a) Set Context name same as Absence type (Ali Planned End Date Type)

b) Use the Absence_type_ID as the "Context Code" instead of name.

So, in this example, For Ali Planned End Date Type, from above query output, ABSENCE_TYPE_ID is
300000106791904. Use this 300000106791904 as the "Context Code" instead of name.
Save.

Within Context Sensitive Segments above, click “Create” to take you to “Create Segment” page below:

Fill up required values, like Name, Data type, value set, etc as per your requirements.
FYI - Click View Value set,

Save and Close

Click Done

Save and Close.


Step 4:

Deploy FlexField
Step 5: Test the setup by adding a absence type via Manage Absence Records

Go to Person Management> Manage Absence Records,

Add a new record, by selecting random Absence type than one which was setup, lets say, Ali Military

No defaulting of context segments done yet.

Now, Add a new record, by selecting our test Absence type Ali Planned End Date Type
As seen above, Context Segment, which was setup earlier is defaulted automatically when Type is
selected as Ali Planned End Date Type. “Generic” segment with value set as 20 characters displayed as
well. This is how one can display different fields depending on absence type being selected.

Regarding last line in Doc ID 2051814.1:

“The context needs to be created for all absence types. For absence types where no value is required,
create dummy contexts with the Absence_Type_ID. If this is not done, there may get an error when
selecting an absence type for which there are no defined contexts.”

Random errors like one below can be seen when selecting absence type, hence suggestion to have
dummy contexts created (without any segments)

For example, Ali Military – Absence_Plan_ID = 300000012787668

To avoid any such errors seen, it is recommended to create blank contexts for remaining absence types
(without any segments) for ALL absence types that exist in your setup.
Save

Done

Save and Close

Deploy again
Context Ali Military defaults automatically upon selection of Ali Military Ali LE type.

This is what the dummy context is referring to.