ScreenRecords allows passing values to a screen record by creating a correspondence between a screen record and a program record.
A screen record is a set of fields on a screen form that can be referenced as a single object.
4GL automatically creates a default screen record which includes form fields that are connected to the same database (or are not connected to any data base). As our forms are FormOnly, all the fields in them belong to the default FormOnly record which comprises all the form fields which are not linked to any database. You don’t have to specify this default screen record, because it is created automatically.
The members of a screen record are form fields, and like in the program record, they are called members.
Screen records are listed as the first-level children of a form object and are specified with its screenRecords property:
There are screen records that are created automatically and change when the form content is changed. The main default screen record is the FormOnly screen record. Any form widget, to which the input is possible, is added to the FormOnly screen record. This means, that widgets designed only for data display or user manipulation (label, button, progressbar) are not included to the FormOnly screen record.
There are also screen records automatically created for form tables and tree tables. They include the fields that fill the table columns. The changes in the table structure are reflected in these screen records content. If a column is added or deleted from the table or a tree table, the corresponding field is added or deleted from the table screen record. The identifiers of tables and their screen records are identical and bound. The changes in one lead to the changes in the other.
To add a new screen record, press the Add button to the right from the property. This will create an empty screen record with a default identifier:
To add a field to the screen record, right click on this field in the editor or Structure view and select Add to ScreenRecord option:
This will call a dialog window where you should choose the screen record to which the field should be added, and then press the Add To button, and the field will appear in the selected Screen Record list:
The screen records can be manipulated from both Form Container properties, as is shown above, and from the Screen Record properties - each screen record is displayed to the Structure view and can be selected for further manipulations:
To add screenrecords, select them at once, click the Add to ScreenRecord context menu option, and in the appearing dialog windows, select the screen record each of them should be added to.
To change the order of the fields in a screen record or delete one or several fields, press the "-" button next to the fields list. This button opens the fields manipulation window:
When a field is selected, the field manipulation buttons become activated, and it can be moved up, down, to the top or to the bottom of the list, as well as deleted from the screen record.