Key Flexfield Structure Instances and Segment Instances

A key flexfield structure can have one or more alternate structure instances. The instances of a key flexfield structure share the following aspects of the structure.

  • The same set of segments

  • The same arrangement of segments

  • The same properties at the segment and structure levels

The differences among structure instances include whether dynamic combination creation is permitted. Likewise, at the structure instance level, differences among segment instances are based on the following:

  • Value set

  • Default type and default value

  • Tree code

  • Whether the segment is any of the following:

    • Required

    • Displayed

    • Enabled for business intelligence

    • Optional or required as a query criterion

For example, you can use one group of value sets for the US and another for France.

The figure shows a part number key flexfield that has multiple possible structures. A given structure has multiple possible instances. Also, a given structure instance has segment instances that differentiate it from other structure instances.

The structures differ in the number of segments and the segment separators used. The structure instances share all the properties defined for that structure. However, the structure instances may vary if the properties are defined at the structure instance or segment instance level. For example, the value set assigned to the segment instances.

Query Required Segment Instances

You can designate a key flexfield segment instance as a query for making it a selectively required attribute. A user can use it as a key flexfield combination search. On the Manage Key Flexfields UI page, if you indicate that a segment instance requires indexing, add the column representing the segment to the database index. Commonly, a database administrator (DBA) adds columns to the database index.

Following deployment, the combination picker of the key flexfield displays the query required attributes as selectively required. A user must specify at least one of the query required attributes in the search criteria. This prevents unnecessary searches that could cause performance issues.

For example, you mark the cost center and account attributes as query required and ensure that the corresponding columns in the database are indexed. A user can search for combinations by entering cost center or account or both as search criteria. No search is performed if a user doesn't enter at least one query required attribute as search criteria.

Tip: Index the Structure Instance Number column on your combinations table to improve run time performance.

Dynamic Combinations

If a key flexfield supports dynamic combination creation, you can select to enable this feature by selecting Dynamic Combination Creation Allowed. As a result, users enter values at run time that produce new account combinations for the flexfield. If Dynamic Combination Creation Allowed isn't enabled, new valid combinations can only be entered using the combinations table for the flexfield.

Trees

You may define a tree code for the value set assigned to the segment instance. When you assign the tree code to the segment instance, tree hierarchy search operations are available on the segment values.

For a segment instance to be based on a tree, the following must be true.

  • Application development registered the key flexfield with a tree structure. The tree structure may be fixed across all segments in the flexfield, or may vary across segments.

  • A tree code for that tree structure exists.

  • The tree code includes tree versions containing the values of the value set assigned to the segment instance.

  • You assign the required tree code directly to the segment instance.

If these conditions are satisfied, you can assign the same or different tree codes to the different segment instances that use the same value set.