Changing Processing Flow

To change the flow of normal form processing, you must tell the system what you want to do next by specifying the number of the item that you want to go to or the next action you want performed. Do this by calling sfm_nextitem():

void sfm_nextitem(item_num_or_action_code, dfmp)

int item_num_or_action_code;
 
 
/* Item to go to or next action code
*/
DFORMPTR dfmp;
/* Pointer to form being processed
*/

The call to sfm_nextitem() should be made just prior to the return statement in your function.

Specify either the number of the item that you want the user to go to or an action code. Action codes available for data forms and scrollable regions are listed in Table 34.2. Note that some action codes are used by the system simply to determine the next item to go to. For instance, calling:

sfm_nextitem(AC_NEXTITEM, dfmp);

calculates the next item by simply adding one to the number of the item currently being processed. This call does not change the next action code in the form structure. However, calling:

sfm_nextitem(AC_QUIT, dfmp);

causes the next action code to change so that the field and form editors can read it and quit processing. Generally, the item movement codes listed in Table 34.2 that indicate what item to go to next will calculate the next item number. The form movement codes set the next action code in the form structure, where it is read by the form, field, and scrollable region editors.


Home Contents Previous Next