Previous  Next          Contents  Index  Navigation  Glossary  Library

Reference Fields

Using a field as a reference field has no effect on the field itself. That is, the reference field is simply a normal form field that has nothing to do with the flexfield unless you define the flexfield to use it as a reference field. Typically, an application developer specifies one or more fields on the form as potential reference fields while building the descriptive flexfield into the form, and then you decide which, if any, reference field you want to use. Reference fields provide a way for you to tie the context-sensitivity of descriptive flexfield information you capture to existing conditions in your business data.

If you use a reference field, the value of that field populates its own column. For example, if the reference field on your form is the "Country" field, it populates the "country" column in the table (remember that the reference field is just an ordinary field on the form before you choose to use it as a reference field). However, that reference field value also populates the structure (context) column in the table, since that value specifies which structure the flexfield displays. If you provide a context field in the flexfield pop-up window, in addition to using the reference field, the reference field essentially provides a default value for the context field, and the user can choose a different context value. In this case, the reference field column and the structure column might contain different values. If you use the reference field without a displayed context field, the values in the two columns would be the same. The form also contains a hidden context field that holds the structure choice, regardless of whether you choose to display a context field in the pop-up window.

The field you choose must exist in the same block as the descriptive flexfield. In addition, if the descriptive flexfield appears in several different windows or blocks, the same field must exist in all blocks that contain this descriptive flexfield. You can specify your field using either the field name by itself or using the :block.field notation.

Suggestion: Choose your reference fields carefully. A reference field should only allow previously defined values so that you can anticipate all possible context field values when you define your structures using the Context Field Values zone.

For example, the descriptive flexfield in an application window may be used to capture different information based on which country is specified in a field on that window. In this case, the country field could be used as a reference field.

Typically, you would define different structures of descriptive flexfield segments for each value that the reference field would contain. Though you do not necessarily define a structure for all the values the reference field could contain, a field that has thousands of possible values may not be a good reference field. In general, you should only use fields that will contain a relatively short, static list of possible values, such as a field that offers only the choices of Yes and No or perhaps a list of countries. You should not use fields that could contain an infinite number of unique values, such as a PO Number field or a date field (unless that date field has a list of a few particular dates, such as quarter end dates, that would never change). Often the business uses of the particular window dictate which fields, if any, are acceptable reference fields.

Suggestion: A descriptive flexfield can use only one field as a reference field. You may derive the context field value for a descriptive flexfield based on more than one field by concatenating values in multiple fields into one form field and using this concatenated form field as the reference field (this may require a customization to the form if the form does not already include such a concatenated field).


         Previous  Next          Contents  Index  Navigation  Glossary  Library