Using Sub-Forms and Sub-Menus in Your Action Function

To use sub-forms and sub-menus in your action functions, you should do the following:

The simplest way to do this is to have your user function read the form from the Designer library or create the form in code and then process the form. However, in some cases you may wish to get information about the sub-form or sub-menu to be processed from the menu field itself. For example, you may wish to use the same action function on two different menu fields, or to create a link in the Designer between this menu field and its sub-form.

At the same time that you specify the menu action function, you can specify a sub-form to be used in your menu action function. If you plan to use a data form or menu in your action function, you have the option of specifying the form at this time, thus establishing a link between this menu field and the sub-form. However, you do not have to specify a sub-form at this point, even if your menu action function will process a menu or data form.

Note: If you plan to call FORMCALL() or MENUCALL() from your action function, you must specify the sub-form when creating or defining the menu field. This establishes the necessary links between the menu field and the sub-form, and allows these functions to determine which form to process. However, you can avoid calling FORMCALL() and MENUCALL() simply by calling fm_proc() and mn_proc() yourself.

More:

General: Specifying No Sub-Form

Designer: Specifying a Sub-Form in the Designer

Code: Specifying a Sub-Form Pointer in the mnf_def() Call


Home Contents Previous Next