Is it possible to assign a submenu label using a parameter? I am trying to make a menu that is in our product as generic as possible so that we can give our customers custom menu options. I am trying to avoid hard-coding. Ideally, what I'd like to do is give the client a custom program that would define the program to run and a label describing the program. I'd like to pass these parameters from their custom program back to our product code and display in the submenu.
The custom code is:
define output parameter custfm-pgm1 as char.
define output parameter custfm-pgm1-label as char.
assign custfm-pgm1 = "w-bbillfm.w"
custfm-pgm1-label = "Branch Billing File Maintenance".
Then back in the product, the menu is defined as:
DEFINE SUB-MENU m_Custom
menu-item m_custfm-pgm1 label m_custfm-pgm1-label.
This define statement does not work unless I contain the label in quotes. I would like the have the value of the label to be the parameter value. Is this possible?
Please let me know if you need any clarification. Thanks!
You can certainly do it if you create the menu dynamically. Take a look in the documentation for CREATE SUB-MENU.
menu-item m_custfm-pgm1 label "".
DEFINE MENU m_Test.
menu-item m_custfm-pgm1:label in MENU m_Custom = m_custfm-pgm1-label.