VBS_GetPreviousLength (Method)
Â
Â
Â
Get the length of the previous protected or unprotected field.
Â
Parameters
No | Name | Type | Optional | Default | Description |
---|---|---|---|---|---|
1 | row | Variant | No | - | Position on the screen from where the search starts |
2 | column | Variant | No | - | Â |
3 | length | Variant | No | - | On success will contain the length of the field in characters. In the case of an error, the contents of this parameter are undefined |
4 | ft | Yes | UNPROTECTED | Get the length of the previous PROTECTED or UNPROTECTED field. Â The default is UNPROTECTED | |
Return Code | Description | ||||
JGS_OK | The field length was found | ||||
JGS_PARAMETERERROR | Missing or invalid parameter | ||||
JGS_NOTCONNECTED | Your application is not connected to any valid session | ||||
JGS_POSITIONERROR | The specified position in the screen is invalid | ||||
JGS_SYSERROR | The function failed due to a system error | ||||
JGS_NOFIELD | The position was not inside a field or the screen is unformatted | ||||
JGS_ZEROLENFIELD | The specified field has a length of 0 |
Remarks
This function starts at the specified position. Â It searches backward for the next PROTECTED or UNPROTECTED field and retrieves it's length.
Sample Code
Â
Dim column as Variant
Dim myLength as Variant
Dim myType as FieldType
Dim result as Long
row = 18
column = 45
myType = PROTECTED
result = field.VBS_GetPreviousLength(row, column, myLength, myType)
If result = JGS_OK then
... Â Â ' myLength contains length of previous protected field
Else ...
Â
QWS3270 Automation copyright © Jolly Giant Software Inc. All rights reserved.
Â