HP Data Entry and Forms Management System (VPLUS) Reference Manual (32209-90024)
Chapter 6 277
USING VPLUS INTRINSICS
INTRINSIC DESCRIPTIONS
VGETFIELD
Copies contents of specified field from data buffer in memory to an application.
Syntax
VGETFIELD {
comarea,fieldnum,fieldbuf,buflen,actualen,nextfldnum
}
Parameters
comarea
Must be
comarea
name specified when the forms file was opened with
VOPENFORMF. If not already set, the following
comarea
items must be set
before calling VGETFIELD:
cstatus
Set to zero.
language
Set to the code identifying the programming language of
the calling program.
comarealen
Set to total number of two-byte words in
comarea
.
VGETFIELD may set the following
comarea
items:
cstatus
Set to nonzero if call unsuccessful, or if requested field has
an error, or if
fieldnum
is unacceptable.
fieldnum
Two-byte integer variable containing the number assigned to the field by
FORMSPEC.
fieldbuf
Character string in an application to which data entered in specified field
is copied.
buflen
Two-byte integer variable that specifies the number of bytes in
fieldbuf
.
actualen
Two-byte integer to which VGETFIELD returns the number of bytes actually
moved to
fieldbuf
.
nextfldnum
Two-byte integer to which VGETFIELD returns the number of the next field
in screen order. If there are no more fields, zero is returned. If
fieldnum
was set to zero or a negative number by an application, this is an error. In
this case, VGETFIELD returns the number of the first field in screen order
in
nextfieldnum
.
Discussion
VGETFIELD transfers the contents of the field specified by
fieldnum
from the data buffer to
a variable in an application. This is in contrast to VGETBUFFER which retrieves data
according to the current field layout.
When considering what is transferred by VGETFIELD, keep in mind that all the fields
defined for a particular form in FORMSPEC are assigned numbers. The number assigned
to a field by FORMSPEC does not change regardless of any changes to the field's position
in the form or to its length and does not necessarily correspond to the screen order. The
field numbers on a form can only be changed with the batch command, RENUMBER, as
described in Section 7. The field number must not be confused with the field's position in
the data buffer, which corresponds to its position in the form according to screen order, not
assigned field number.