Task Branching

There are times when a particular task actually represents a number of distinct sub-tasks. For example, when adding a new item of some type, you add a new item with all blank fields, or a new item with field values inherited from a selected item of the same type.

This task branching can be handled in different ways. Sometimes the sub-task is obvious from the item selected, and no user input is required. The code can make the correct sub-task choice on behalf of the user.

If the user must explicitly make the sub-task choice, the preferred method is to define the task as a menu. Using this method, when the user clicks the task button a menu drops down, presenting them with the sub-task choices. This type of mechanism is easily configured within the corresponding task element in the module configuration file.

Another method of accomplishing sub-task branching when the user must make the choice is to use an intermediate dialog box. This can be done by adding an ONTASK attribute to the form associated with a task ("postto" type tasks only). The ONTASK attribute names a function to be executed after the user clicks the task button. This function could display the dialog window and then submit the form unless the user cancels the task.


All rights reserved.