snextfld - set next field to process
Snextfld specifies the next field to be processed for data entry.
Normally, after exiting a field, the cursor moves to the next
field in the formfile, or, if a up arrow key was pushed, the
cursor moves to the previous field. Snextfld changes the next
field to be processed to the first field in the current form with
a field_name or edit_name equal to the fieldname parameter. Only
operator modifiable fields can be specified as field names for
snextfld. Thus, no fields are valid when in FIND mode, and key
fields are not valid when in UPDATE mode. If the specified field
name is valid, then snextfld returns a nonzero value.
If fieldname is NULL or an empty string, then snextfld sets the
next field to be processed back to the next sequential field.
This can be used to undo the effect of a previous snextfld call.
Snextfld does not actually move the cursor at the time of call,
but instead saves the field to process next. It is not necessary
to use snextfld to "position the cursor" before calling
sread(C-3) or swrite(C-3). Swrite positions the cursor
automatically to the correct field, and sread does not read the
contents of the screen.
The user edit routine may inspect a record when the STORE key is
pushed, and if any errors are discovered, snextfld may be used to
position the cursor to the field in error. The user edit routine
can then return an error message. Form displays the error
message, and then positions the cursor to the field specified in
the snextfld call. This allows the operator to easily identify
the field in error and to correct the error.
Chapter 3, Form Programming Guide
Snextfld returns a value of zero if the field name cannot be
found, or if the cursor may not be moved to the named field.
Snextfld is only available in user edit routines.