The default value of an item is determined by the value of the Initial Value item property. The value you specify must be compatible with the item's data type. For example, the default value for a text item having a data type of DATE must be a value that can be displayed in a valid date format.
Form Builder assigns a default value to an item when a new record is created. Specifically, Form Builder assigns the default value whenever the item is part of a record whose status is marked NEW.
The default value can be any of the following:
- raw value (216, 'TOKYO')
-
$$DATE$$, $$DBDATE$$, $$DATETIME$$, $$DBDATETIME$$
- form item value (:block_name.item_name)
- global variable (:GLOBAL.my_global)
- form parameter (: PARAMETER.my_param)
- a sequence (:SEQUENCE.my_seq.NEXTVAL)
It is common to specify default values for check boxes, radio groups, and list items, so that the items appear with the desired selection state (checked or unchecked, etc.). When you set default values for these items, remember that the default value does not get assigned until Form Builder creates a new record in the item's block. You can force Form Builder to create a new record in a block by navigating to the block programmatically, for example, in a When-New-Form-Instance trigger.
Note: Simply copying a value to a field does not require navigation to the block, so it does not create a new record in the block, and does not display default values.
Partager