A data structure that provides information about the state of the current form at the time of the last event in the current window.
The ThisForm data structure provides information about the state of the current form at the time of the last event in the current window.
The ThisForm structure contains a number of fields that are reset when a window containing a form or display becomes the current window. An application program can use the information in the fields to determine what action, if any, to take.
The fields in the ThisForm structure are
DisplayTag, FFFieldNum, FieldChanged, FieldTag, FormChanged, FormNum, FormTag, ReqError, ReqFieldNum, ReqFormNum, ReqSubscript, ReqTag, Subscript, ValError, ValFieldNum, ValFormNum, ValSubscript, ValTag
The tag of the display that had focus at the time of the last event in the current window.
thisform.displaytag
Character string identification tag of the current display. Can be reset by an application program.
Identifies, by identification tag, the display that had focus at the time of the last event in the current window.
A code indicating if the form field that had focus at the time of the last event in the current window was modified by the application user.
thisform.fieldchanged
"1" ($True), or "0" ($False). Can be reset by an application program.
Set to "1" ($True) if the value of the field that had focus changed after the application user was placed in control of the interface. Otherwise, set to "0" ($False).
The identification number of the form field that had focus at the time of the last event in the current window.
thisform.fffieldnum
A number. Can be reset by an application program.
The identification number of the form field that had focus at the time of the last event in the current window.
The combination of ThisForm.FormNum, ThisForm.Subscript, and ThisForm.FFFieldNum can uniquely identify a particular form field in a particular form.
form set (cursor) (ThisForm.formnum, \
ThisForm.fffieldnum, \
ThisForm.subscript)
The tag of the form field that has focus at the time of the last event in the current window.
thisform.fieldtag
A character string. Can be reset by an application program.
The identification tag of the focus form field at the time of the last event in the current window.
The combination of ThisForm.FormNum, ThisForm.Subscript, and ThisForm.FFFieldNum can uniquely identify a particular form field in a particular form.
A code indicating if any form field in the form or display had been modified by the application user at the time of the last event in the current window.
thisform.formchanged
"1" ($True), or "0" ($False). Can be reset by an application program.
Set to "1" ($True) if the value of any field in the current form or display changed after the application user was placed in control of the interface. Otherwise, set to "0" ($False).
The form number of the form that had focus at the time of the last event in the current window.
thisform.formnum
A number. Can be reset by an application program.
The identification number of the current form at the time of the last event in the current window.
The combination of ThisForm.FormNum, ThisForm.Subscript, and ThisForm.FFFieldNum can uniquely identify a particular field in a particular form.
form set (cursor) (ThisForm.formnum, \
ThisForm.fffieldnum, \
ThisForm.subscript)
The identification tag of the form that had focus at the time of the last event in the current window.
thisform.formtag
A character string. Can be reset by an application program.
The identification tag of the current form at the time of the last event in the current window.
The combination of ThisForm.FormNum, ThisForm.Subscript, and ThisForm.FFFieldNum can uniquely identify a particular field in a particular form.
thisform.reqerror
thisform.reqfieldnum
thisform.reqformnum
thisform.reqsubscript
thisform.reqtag
Character string (binary). Can be reset by an application program. (ReqError)
Character string (alpha). Can be reset by an application program. (ReqTag)
Number (INT). Can be reset by an application program. (ReqFieldNum, ReqFormNum, ReqSubscript)
The variables indicate if all required form fields had values at the time of the last event in the current window.
ThisForm.ReqError is set to '1' ($True) if any required form field in the current form or display has not been completed when an event occurs. Otherwise, it is set to '0' ($False).
If ThisForm.ReqError is '1', then the other variables are set to the form number (ThisForm.ReqFormNum), form field number (ThisForm.ReqFieldNum), subscript (ThisForm.ReqSubScript), and tag (ThisForm.ReqTag) of a required form field that has no value.
while
form input
...commands...
if ThisForm.reqerror = $true
form set (focus) (ThisForm.reqformnum, \
ThisForm.reqfieldnum, \
ThisForm.reqsubscript)
continue
endif
endwhile
If "required" fields in the current form have not been completed, focus is set to one of those fields on the next input request.
The instance of the form where focus was located at the time of the last event in the current window.
thisform.subscript
A number. Can be reset by an application program.
Identifies, by number, the instance of the form where focus was located at the time of the last event in the current window (when several instances of the form appear in a display). If the form appears only once, ThisForm.Subscript is always 1.
For example, if a form is repeated eight times in a display, ThisForm.Subscript might be set to any number from 1 to 8. The particular number indicates in which repetition of the form the focus was located.
The combination of ThisForm.FormNum, ThisForm.Subscript, and ThisForm.FFFieldNum can uniquely identify a particular field in a particular form.
form set (cursor) (ThisForm.formnum, \
ThisForm.fffieldnum, \
ThisForm.subscript)
find Products where ProdCode =
fProducts.ProdCode[ThisForm.subscript]
thisform.valerror
thisform.valfieldnum
thisform.valformnum
thisform.valsubscript
thisform.valtag
Character string (binary). Can be reset by an application program. (ValError)
Character string (alpha). Can be reset by an application program. (ValTag)
Number (INT). Can be reset by an application program. (ValFieldNum, ValFormNum, ValSubscript)
The variables indicate if all form fields had valid values at the time of the last event in the current window.
ThisForm.ValEror is set to '1' ($True) if any form field in the current form or display contains an invalid value when an event occurs. Otherwise, it is set to '0' ($False).
If ThisForm.ValError is '1', then the other variables are set to the form number (ThisForm.ValFormNum), form field number (ThisForm.ValFieldNum), subscript (ThisForm.ValSubscript), and tag (ThisForm.ValTag) of a form field that has an invalid value.
while
form input
...commands...
if ThisForm.valerror = $true
form set (cursor) (ThisForm.valformnum, \
ThisForm.valfieldnum, \
ThisForm.valsubscript)
continue
endif
endwhile
If fields in the current form failed the validation check, focus is set to one of those fields on the next input request.