Having a complete mental block. I'm looking at moving our static menus into the DB and have come across an issue.
Apart from the fact that this is horrendous to read, is there a way of achieving this dynamically?
That's what I'm doing with the calls that are simple procedure calls. Just not sure what to do with the ones that take params short of creating an internal procedure without params for each one.
Code:
CREATE MENU-ITEM lv-item-ptr IN WIDGET-POOL "StubMenu"
ASSIGN PARENT = lv-sub3-ptr
LABEL = "Update Billing Record Current Month Number..."
TRIGGERS:
ON CHOOSE PERSISTENT
RUN DataDefinitionUpload IN THIS-PROCEDURE (INPUT "lv-CallingHandle=" + STRING(THIS-PROCEDURE:HANDLE) + "|lv-Mode=IMPORT|lv-ProgramFileName=" + THIS-PROCEDURE:FILE-NAME + "|lv-ParamList=lv-FormatName#EQUALS#Update Billing Current Month No.").
END TRIGGERS.
CREATE MENU-ITEM lv-item-ptr IN WIDGET-POOL "StubMenu"
ASSIGN PARENT = lv-sub3-ptr
LABEL = "Update Billing Record Purchase Order Number..."
TRIGGERS:
ON CHOOSE PERSISTENT
RUN DataDefinitionUpload IN THIS-PROCEDURE (INPUT "lv-CallingHandle=" + STRING(THIS-PROCEDURE:HANDLE) + "|lv-Mode=IMPORT|lv-ProgramFileName=" + THIS-PROCEDURE:FILE-NAME + "|lv-ParamList=lv-FormatName#EQUALS#Update Billing Record PO Number").
END TRIGGERS.
CREATE MENU-ITEM lv-item-ptr IN WIDGET-POOL "StubMenu"
ASSIGN PARENT = lv-sub3-ptr
LABEL = "Update Costs For Split Gas Meter..."
TRIGGERS:
ON CHOOSE PERSISTENT
RUN DataDefinitionUpload IN THIS-PROCEDURE (INPUT "lv-CallingHandle=" + STRING(THIS-PROCEDURE:HANDLE) + "|lv-Mode=IMPORT|lv-ProgramFileName=" + THIS-PROCEDURE:FILE-NAME + "|lv-ParamList=lv-FormatName#EQUALS#Update Costs For Split Gas Meter").
END TRIGGERS.
Apart from the fact that this is horrendous to read, is there a way of achieving this dynamically?
Code:
CREATE MENU-ITEM lb-DBMenuItem.MenuItemHandle IN WIDGET-POOL "StubMenu"
ASSIGN
PARENT = tt-DBMenuItem.MenuItemHandle
LABEL = lb-MenuItem.MitMenuItemDescId
TRIGGERS:
ON CHOOSE PERSISTENT RUN VALUE(lb-MenuItem.MitMenuCommand) IN THIS-PROCEDURE.
END TRIGGERS.
That's what I'm doing with the calls that are simple procedure calls. Just not sure what to do with the ones that take params short of creating an internal procedure without params for each one.