Tuesday 25 October 2011

Initialization

Form Builder initializes a form by creating a null record in each block of the form. Each item of a null record is null. Form builder replaces the null record with an initialized record the first time it enters the block. At that time it gives initial values to some items. An item's Initial Value property specifies the item's initial value.

Note: If a trigger assigns a value to an item in a null record, the record is no longer null. Form Builder never assigns an initial value to any item in the record. For example, a PRE-FORM trigger fires while the form contains only null records. If it assigns a value to an item, it must ensure that all other items of the record receive appropriate initial values.

Special considerations apply to certain types of items.

Check boxes

The initial value determines whether the check box is initially checked or unchecked. You must specify a valid initial value unless one of the following is true:
? The item's Mapping of Other Values property is set to Checked or Unchecked.
? The value associated with Checked or Unchecked is Null.
Note: A check box in a null record appears unchecked.

List items

You must specify a valid initial value unless one of the following is true:

? The item's Mapping of Other Values property has a non-null value.
? The value associated with one of the list elements is Null.
Note: A list item in a null record appears blank.

Radio groups

You must specify a valid initial value unless one of the following is true:

? The item's Mapping of Other Values property has a non-null value.
? The value associated with one of the radio buttons in the group is Null.
Note: A radio group in a null record appears with no radio button selected.

Synchronized items

If items, say B and C, have their Synchronize with Item properties set to the name of another item, say A, then A, B, and C form a set of synchronized items. A is the master item of the set, and B and C are subordinate items. Synchronized items were called mirror items in earlier versions of Form Builder.
The items of a synchronized set share a common data value, but can have different item properties. Form Builder takes data-specific properties and triggers from the master item and ignores those properties and triggers for the subordinate items.

Form Builder initializes synchronized items from the master item's Initial Value property. Form Builder also uses the master item's ON-SEQUENCE-NUMBER trigger.
If the designer specifies an Initial Value property or an ON-SEQUENCE-NUMBER trigger for a subordinate item, Form Builder ignores them and issues a warning.
Form Builder ignores an item's Initial Value property if all of the following are true for the item (or an item synchronized with it):

The item is a check box, poplist (drop-down list), Tlist (Text list), or radio group.
The item has no element corresponding to the specified initial value.
The item's Mapping of Other Values property has a null value.

No comments:

Post a Comment