Retain Field Property
Obsolete
Refer to the Field Options property in the DataDictionary class.
Purpose
To keep data in a window as an aid to data entry through an entry_clear message or a single press of the Clear Panel accelerator key, requiring a second press to clear it.
Syntax
set field_options field file.field to dd_retain
or
entry_item file.field [
{retain
[..., option]
}
]
What It Does
When retain is on an entry_item, it prevents the item from clearing when an entry_clear is received, or when the Clear Panel or Clear All Panels accelerator keys are pressed. Items in the same object without retain will be cleared. However, either key will clear items with retain on them as well after the initial message.
entry_item candidat.city {retain}
In this example, data in the item connected to Fieldcity in Database File candidat is retained through a single clearing message.
Field properties may be applied to fields using the field_options property in the construct_object procedure of a DataDictionary object.
set field_options field candidat.city to dd_retain
In this example, all DEOs using the DataDictionary containing this line and addressing Fieldcity in File candidat will apply the dd_retain field property to the connected items.
Notes
-
If an
entry_itemwith adisplayonlyornoenterfield property is processed immediately before anentry_itemwith aretainfield property, theretainacts as if it were aretainall, and the item cannot be cleared by any number of presses of Clear Panel. -
The
entry_clear_allmessage clears items to whichretainapplies, as well as those to which it does not. -
If you want to prevent Clear Panel from ever clearing the item, use the
retainallentry_itemfield property.