Checks whether a field is present in the current screen. Use the optional iInd parameter to refer to the instance of a field in a subfile.
Syntax
CHECK_FIELD_EXISTS(sFieldName, [iInd])
Parameters
sFieldName | Required. A string that contains the name of the field to check. |
iInd | Optional. Integer, must be greater than zero. For subfile fields this is the specific instance of the field. |
Return Value
Boolean. Returns one of the following possible values:
true | The field was found in the current screen. |
false | The field was not found in the current screen. |
Remarks
For subfile fields you may choose not to pass iInd. When passed, iInd must be greater than zero or else it will return false.
Example
Check that that the field named PageMarker is present on this screen:
if (CHECK_FIELD_EXISTS("PageMarker"))Read every subfile entry on the page
for ( Index = 1; CHECK_FIELD_EXISTS("ColGivename", Index); Index++ )
{
var Givename = GETVALUE("ColGivename",Index);
var Empno = GETVALUE("ColEmpno", Index);
...
}