Change Variables
The FRS maintains a change variable, set by the user typing in a field, for each form and each field on a form. In addition, if the field is a table field, each element in the table field's data set, except hidden columns, also has an associated change variable.
The change variable for the form is set whenever the user makes any change to any field on the form. Similarly, a change variable associated with a specific field or a data set element is set whenever the user types into that field or changes that element. This change variable is cleared whenever a value is placed into the field by the program (by way of the clearrow, putrow, loadtable, and insertrow statements). However, a change in the value of a derived field does not set or clear the change variable for the derived field.
Form and field change variables are maintained separately; for example, if you clear all field change variables, Ingres does not automatically clear the form change variable--your application program must clear the form change variable separately.
The FRS scrolls the change variables when the table field scrolls.
A field change variable is useful for determining which fields on a form or in a table field have been changed by the user. An application can thus optimize special data checks by checking only the elements that have actually changed.
You can set the change variable or obtain its value by using the set_frs and inquire_frs statements. For example, to set a table field change variable, the syntax is:
exec frs set_frs row 'formname ' 'tablefieldname ' [row#]
(change (columnname) = integervar)
To obtain the value of a table field change variable, the syntax is:
exec frs inquire_frs row 'formname ' 'tablefieldname ' [row#]
(change(columnname ) = integervar )