Use Flexfields in a User-Defined Query

Use a user-defined query to extract descriptive flexfields and extensible flexfields that are available in Business Object Service (BOSS) Business Views.

Flexfield paths can differ from the database columns in the corresponding application table. Use the flexfield path in the query definition and assign an alias to each field that you want to return.

Before You Start

Before you create or update a user-defined query:
  1. Deploy the descriptive or extensible flexfield.

  2. Synchronize the flexfield with its business object.

    For instructions, see Synchronize Flexfields with Business Objects.

  3. Verify that the flexfield is available in the applicable Business View.

Add Flexfields to a Query Definition

  1. Create or edit a user-defined query. For more information, see Create a User-Defined Query.

  2. In the query definition, add the applicable Business View in the viewQueries section.

  3. In fieldAliases, map each flexfield path to an output alias.

  4. Reference the aliases in the select statement.

  5. If the flexfield uses contexts, include the required context path and filter the query by the applicable context value.

  6. Save the query and run it to verify the output.

Use the flexfield paths that apply to your configured flexfields.

For descriptive flexfield paths, use the following patterns:
  • Global segment:
    ora_flex_<flexfieldCode>__info.<segmentName>
  • Context-sensitive segment:
    ora_flex_<flexfieldCode>__info<CONTEXT_CODE>.<segmentName>

Extensible flexfield paths are exposed by the extensible flexfield business object and can be referenced through the applicable Business View.

For BQL query examples, see Flexfield BQL Query Examples.