popupdoublefieldchoices
CHOICE
,
PRIMARYFIELD
,
SECONDARYFIELD
,
INITIAL
,
SELECTED

The popupdoublefieldchoices statement displays a pop-up menu listing values in a specified field, with submenus containing values from a second field.


Parameters

This statement has five parameters:

choice – field or variable where the final user choice will be placed (or "" will be placed if no menu item was chosen). This field or variable will contain two values separated by a period, the choice from the primary menu and the submenu.

primaryfield – Field that contains data to be listed as choices in the main pop-up menu.

secondaryfield – Field that contains data to be listed as choices in submenus.

initial – Initial choice to be selected in main pop-up menu (or “” if no choice).

selected – This optional parameter specifies whether the values used to build the pop-up menus should be pulled from all records or only selected records. If this parameter is blank or omitted, all records will be used. Procedure will use selected records only if any other value is in this parameter.


Description

This statement can be used to produce a pop-up menu in response to clicking on a button. Instead of specifying the items in the menu, the items are automatically gathered from the specified field. The items will be displayed in alphabetical order.

The menu will pop-up over the button that was pressed. It is intended that this statement be used in a procedure that is triggered by a button on a form (or any form object that triggers a procedure). The procedure must be triggered on mouse down, not mouse up.

Suppose your database contains fields named Category and PayTo. This example will automatically pop-up a menu listing all of the categories in the database. Each menu item will have a submenu attached to it that lists the actual entities that have been paired in each category.

local myChoice,myCategory,myPayTo
popupdoublefieldchoices myChoice,Category,PayTo,""
myCategory=array(myChoice,1,".")
myPayTo=array(myChoice,2,".")

See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0.