Was this helpful?
Retrieving Information about a Form
The form object type is used to obtain information about a form. The specified form must have been declared in the program before you can reference it in an inquire_frs statement.
The syntax is:
inquire_frs form
(variable = frs_constant[(formname)]
{,variable = frs_constant[(formname)]})
The formname identifies the form about which you are inquiring. If you do not specify a form, the current form is assumed, that is, the form on which the cursor currently rests. (The name constant always refers to the current form and, consequently, never needs a specified form name.) You can use a quoted or unquoted string literal or a program variable to represent formname.
Valid values for frs_constant are listed in the following table:
Frs_constant
Data Type
Returns
change
integer
Returns 1 if the user has changed any displayed data on the form, or 0 otherwise. This constant is set by a user typing at the keyboard. The FRS command clearrest, which is mapped to the Return key on many terminals, sets this constant. Program-based changes to the screen, using putform and so forth, do not affect change. This constant can also be set or altered with the set_frs statement.
columns
integer
Returns the form's size, expressed as the number of columns. If the form is a pop-up, this includes the columns occupied by the form's border.
exists
integer
Returns 1 if the specified form exists, 0 if the form does not exist.
field
character
Returns the name of the current field on the form.
mode
character
Returns the form's display mode. Returned values are one of the following:
none
update
fill
query
read
formdata
None is returned if the specified form is not displayed. Formdata is returned if the inquire statement is issued inside a formdata loop.
name
character
Returns the name of the form. Because this constant always refers to the current form, it is not necessary to specify a formname.
rows
integer
Returns the form's size, expressed as the number of rows. If the form is a pop-up, the number includes the rows occupied by the form's border.
Last modified date: 08/14/2024