Automatic Refresh Property
Description
Determines whether Oracle Forms re-executes the query to populate an LOV that is based on a query record group. By default, Oracle Forms executes the query to populate an LOV's underlying record group whenever the LOV is invoked; that is, whenever the LOV is displayed, or whenever Oracle Forms validates a text item that has the Use LOV for Validation property set to Yes.
- When Automatic Refresh is set to Yes (the default), Oracle Forms executes
the query each time the LOV is invoked. This behavior ensures that the LOV's
underlying record group contains the most recent database values.
- When Automatic Refresh is set to No, Oracle Forms executes the query
only if the LOV's underlying record group is not flagged as having been populated
by a query that occurred because this or any other LOV was invoked. (Remember
that more than one LOV can be based on the same record group.) If the LOV's
underlying record group has already been populated as a result of an LOV displaying,
Oracle Forms does not re-execute the query, but instead displays the LOV
using the records currently stored in the record group.
The Automatic Refresh property also determines how long records retrieved by the query remain stored in the underlying record group:
- When Automatic Refresh is set to Yes,
records returned by the query are stored in the underlying record group only
as long as the LOV is needed. Once the operator dismisses the LOV, or validation
is completed, the record cache is destroyed.
- When Automatic Refresh is set to No, records from the initial query remain
stored in the LOV's underlying record group until they are removed or replaced.
You can manipulate these records programmatically. For example, you can explicitly
replace the records in an LOV's underlying record group by calling the POPULATE_GROUP
Built-in. Other record group Built-ins allow you to get and set the values
of cells in a record group.
Applies to LOV
Set Oracle Forms, programmatically
Refer to Built-in
GET_LOV_PROPERTY
SET_LOV_PROPERTY
Yes
Usage Notes
- When
multiple LOVs are based on the same record group, it is usually appropriate
to use the same Automatic Refresh setting for each one. This is not, however,
a strict requirement; the following scenario describes refresh behavior when
one LOV has Automatic Refresh set to Yes and another has Automatic Refresh
set to No.
- LOV1 and LOV2 are based on the same record group; LOV1 has Automatic
Refresh set to Yes, LOV2 has Automatic Refresh set to No. When LOV1 is
invoked, Oracle Forms executes the query to populate the underlying
record group. When the operator dismisses LOV1, Oracle Forms destroys
the record cache, and clears the record group.
- When LOV2 is subsequently invoked, Oracle Forms again executes the
query to populate the record group, even though LOV2 has Automatic Refresh
set to No. Because LOV2's underlying record group was cleared when LOV1
was dismissed, Oracle Forms does not consider it to have been queried
by an LOV invocation, and so re-executes the query.
- If, on the other hand, both LOV1 and LOV2 had Automatic Refresh set
to No, Oracle Forms would execute the query when LOV1 was invoked,
but would not re-execute the query for LOV2. This is true even if the
initial query returned no rows.
- When
Automatic Refresh is set to No, you can programmatically replace the rows
that were returned by the initial query with POPULATE_GROUP. Oracle Forms
ignores this operation when deciding whether to re-execute the query. (Oracle Forms looks only at the internal flag that indicates whether a query has
occurred, not at the actual rows returned by that query.)
Automatic Refresh Restrictions
Valid only for an LOV based on a query record group, rather than a static or non-query record group.