HP Data Entry and Forms Management System (VPLUS) Reference Manual (32209-90024)
Chapter 6 263
USING VPLUS INTRINSICS
INTRINSIC DESCRIPTIONS
VCHANGEFIELD
Allows dynamic field attribute definition.
Syntax
VCHANGEFIELD {
comarea,specbuffer,numentries
}
Parameters
comarea
Must be
comarea
specified when forms file was opened with VOPENFORMF.
If not already set, the following
comarea
items must be set before calling
VCHANGEFIELD:
cstatus
Set to zero.
language
Set to code identifying the programming language of the
calling program.
comarealen
Set to total number of two-byte words in
comarea
.
VCHANGEFIELD may set the following
comarea
items:
cstatus
Set to nonzero value if call unsuccessful.
specbuffer
A record; the specifications buffer is an array that provides VCHANGEFIELD
with the information regarding the fields which are to be altered. The
format of the array is as shown in Table 6-8.
numentries
A two-byte integer indicating the number of entries in the specifications
buffer. The specifications buffer can contain up to three types of changes
for each field in the form. That is, one call to VCHANGEFIELD can change the
field type, data type and enhancement of every field in a form. For
example, if a form contains four fields and an application is designed to
make three changes to each field, then
numentries
should have a value of
12.
Discussion
VCHANGEFIELD alters the run-time copy of the current form. It does not modify the contents
of the forms file. The next call to VGETNEXTFORM which actually retrieves a copy of the form
from the forms file will reset the field specifications. The only exception to this is when two
calls to VGETNEXTFORM are performed without resetting
nfname
; the second call will
not
retrieve the form definition from the forms file.
Please note that it is the responsibility of the programmer to ensure that a new data type
is compatible with any initial values or processing specifications which may have been
defined for the field.
If the change type selected is a toggle type, (change type of 1, 2 or 3), the change
specification buffer is returned with the "old" characteristics. Hence, the next
VCHANGEFIELD call with the same buffer will toggle between the characteristics specified in
the first VCHANGEFIELD call and the original characteristics. To toggle between two specific
characteristics, VCHANGEFIELD can be used to set a field (change type of 4, 5, or 6) to certain
starting characteristics without the toggle option at first.