Guidelines for Loading Flexfield Data

Using HCM Data Loader, you can load data for both descriptive flexfields and extensible flexfields. This topic explains concepts that are common to both types of flexfields.

Configuring Flexfields

Before you generate template files for objects with flexfields, you must configure the flexfields in Oracle HCM Cloud. After the flexfields are configured, the METADATA lines in generated template files include all attributes that are required to load the flexfield data. You also see a Flexfield Attributes tab for relevant object components on the Business Object Details page in the Data Exchange work area.

Flexfield Codes

When loading flexfield data, you must supply the flexfield code in the METADATA line in this format:

FLEX:<flexfield code>

For example, to load data for the job descriptive flexfield, the flexfield code is:

FLEX:PER_JOBS_DFF

Relevant flexfield codes appear in the generated template file and on the Flexfield Attributes tab for the business object.

Flexfield Attributes

Flexfield attribute names are those that you specify when configuring the flexfield. Both descriptive and extensible flexfields have one or more contexts. When you include a flexfield attribute name on the METADATA line for an object, you must also identify the context. You provide a hint value in the following format to identify both the flexfield and the context to which the attribute belongs:

<flexfield attribute name>(<flexfield code>=<context code>)

For example, for the _MAIN_CONTRACT attribute of the PER_CONTRACT_LEG_DDF descriptive flexfield with the CN context code, the entry on the METADATA line is:

_MAIN_CONTRACT(PER_CONTRACT_LEG_DDF=CN)

Business Objects with Multiple Descriptive Flexfields

Some business object components support multiple descriptive flexfields. You can include all descriptive flexfield attributes for every flexfield and configured context on a single METADATA line. This approach is possible because you supply both the flexfield code and the context for each attribute.

Lookup and Value Set Validated Flexfield Values

For flexfield values that are validated by lookups, you can supply either the lookup code or the lookup value. To supply the value, you must append the suffix _Display to the attribute name in the METADATA line.

For example, for a configured gender flexfield attribute, you can supply either the lookup code (M or F) or the value (Male or Female). To supply the value, use the attribute name gender_Display, as shown in this example:

METADATA|Job|FLEX:PER_JOBS_DFF|gender_Display(PER_JOBS_DFF=JOBCONTEXT1)|...
MERGE|Job|JOBCONTEXT1|Male|...
MERGE|Job|JOBCONTEXT1|Female|...  

The same is true for flexfield segments validated by table-validated value sets. You can supply either the ID or value. To supply the value, you must append the suffix _Display to the attribute name in the METADATA line.

Note: You're recommended to use the lookup code or value set ID, as the lookup meaning and value set value can be translated. The language of the value provided to the _Display attribute must match the language of the user who's uploading the data. For HCM Data Loader that's the elevated FUSION_APPS_HCM_ESS_LOADER_APPID user, whose language may differ from language of the session user.

Secured Value Sets

A value set is a group of values that validate the content of a flexfield segment. If the value set is security enabled, then it's available to specific users or processes only. You must ensure that the predefined FUSION_APPS_HCM_ESS_LOADER_APPID user has access to any security-enabled value sets that your flexfields reference. Otherwise, the load fails. For more information about enabling access to secured value sets, see the Securing HCM guide.

Deleting Flexfield Segments

Let's say, for GDPR or other compliance purposes, you need to remove values from a flexfield segment and disable it. First, enable the segment if it's currently disabled. Next, change the values for the segment in your HCM Data Loader file to empty. Don't use spaces, and make sure the values are empty. Upload your HCM Data Loader file and confirm that the segments appear empty. Finally, disable the segment.

Here's a tutorial on loading flexfield segments using HDL:Loading Flexfield Segments with HCM Data Loader (HDL)