20-18 Oracle E-Business Suite Developer's Guide
fields, and your users define a long flexfield, your users may see empty flexfield
segments upon entering the flexfield pop-up window after a query. These blank
segments do not adversely affect the underlying data, nor do they adversely affect
flexfield changes if your user updates those segments after querying.
If you use these fields and you have more than one key flexfield in the same row (in a
block) of your form, you should also create one extra set of non-database segment fields
per flexfield. So, if you have three foreign-key-reference flexfields in your block, you
should have four sets of segment fields (for example, SEGMENT1 to SEGMENTn as the
main set; and SEGMENT1_A to SEGMENTn_A, SEGMENT1_B to SEGMENTn_B, and
SEGMENT1_C to SEGMENTn_C as the extra sets). In addition, you should use the
USEDBFLDS="Y" argument for your flexfield definition routine calls. When you do so,
you must write trigger logic to explicitly copy the appropriate values into or out of
these fields before your flexfield routine calls. You must copy your values into the main
set from the appropriate extra set before the WHEN-NEW-ITEM-INSTANCE and the
PRE-INSERT and PRE-UPDATE flexfield event calls. You must copy your values out of
the main set into the appropriate extra set after the POST-QUERY,
WHEN-NEW-ITEM-INSTANCE, WHEN-VALIDATE-ITEM, PRE-INSERT, or
For a descriptive flexfield, it is possible (though not recommended) to create your form
such that the table containing the descriptive flexfield columns is not the base table (or
included in the base view) of the form. To do this, you create all the hidden fields (the
ATTRIBUTEn fields and the structure defining field) as non-database fields on the null
canvas. Then, code trigger and table handler logic that keeps the data in the two tables
synchronized. For example, when your form updates your base table, your
ON_UPDATE table handler should update the ATTRIBUTEn and structure defining
columns in the descriptive flexfield table. Likewise, when your form inserts new
records, you should have logic in your ON_INSERT table handler that inserts into the
descriptive flexfield table. Descriptive flexfields never write directly to a table (base
table or otherwise); they always write to the hidden segment fields.
Create Your Displayed Fields
Create your concatenated segments field as a 2000 character displayed, non-database
text item for either key or descriptive flexfields. For a range flexfield, you create two
non-database fields with the same name but with the suffixes _LOW and _HIGH.
Use the TEXT_ITEM property class for your key and range flexfields. For a descriptive
flexfield, use the property class TEXT_ITEM_DESC_FLEX and name the field
You must attach the dummy LOV from the TEMPLATE form, ENABLE_LIST_LAMP,
to the displayed key or descriptive flexfield field. Make sure that "Validate from List"
property (formerly "Use LOV for Validation") is set to No. This ensures that the List
lamp works properly for your flexfield.
If you experience strange LOV behavior (where the LOV provides "null" as the only
valid choice) or messages that the flexfield cannot be updated and/or has invalid values,