5.16 Invisible Fields

Earlier, it was shown that it is possible to have a field on the screen that does not represent data in the current RMSfile. Lookup fields display data that is in some other RMSfile and not data in the current RMSfile. In this case, the Field Name field was left blank, and the In Data File field was set to no to indicate that there was no data field in the RMSfile for that screen field. It is also possible to have a Field Description form that describes a data field that is in the current RMSfile, but the contents of that data field are not displayed on the screen. If the Invisible field is set to yes, no field is put on the data entry form displayed by form. The field is shown on the form being built by formdef however, so that it can be referenced. Invisible fields are shown by formdef as blinking fields filled with the underscore ( _ ) character. It does not matter where these invisible fields are placed on the form built by formdef. They need only be on the screen somewhere so you can position the cursor to them and display their Field Description form.

Invisible fields can be combined with some of the attributes that have already been discussed. For example, you can initialize a data field in the RMSfile to a particular value and not display the field on the screen. Since the operator would have no way of changing the contents of that field, this would force the data field to always contain the initialization value.

You can also use invisible fields with the copy attribute just mentioned. The contents of some previous field can be copied into a second field, and if this second field is not displayed on the screen, the contents of that second field is forced to the same value as the first field. The last example shows how all these features can be used.