info(“trigger”)

The info(“trigger”) function returns information about how the current procedure was triggered.


Description

The info(“trigger”) function returns information about how the current procedure was triggered. If the procedure was triggered by data entry this function will return the word Key followed by a period and then the key that actually triggered the procedure:

Key.Return
Key.Enter
Key.Tab

If the procedure was triggered by a button, the function will return the word Button followed by a period and then the name of the button, for example:

Button.Save
Button.Calculate Tax
Button.Show Chart

If the procedure was triggered by a custom menu, the function will return the word Menu followed by a period, the name of the menu, another period, and then the menu item. Here are some examples:

Menu.Accounting.Aging
Menu.Letter.New

The example below shows a .CustomMenu procedure written for two custom menus with two menu items apiece.

if info("trigger") = "Menu.Organize.SortByName"
    field FirstName sortupwithin
elseif info("trigger") = "Menu.Organize.SortByZip"
    field Zip sortup
elseif info("trigger") = "Menu.Transaction.Add"
    addrecord
elseif info("trigger") = "Menu.Transaction.Void"
    Description="Void"
    Amount=0
endif

See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0