I am trying to create a Menu based on the user Permissions from a database. Menu is getting created and is getting displayed but only the Menu action is not working.
I am keeping MenuText,MenuAction etc in the database itself. I tried different option but unfortunately Menu action is not working. I tried different options like storing the menu action into a string and then associating to menu action using &(MnuAction) making it a code block etc.
I don't know where I have went wrong. Any help ?
- Code: Select all Expand view
cMenuAction:=alltrim(oRecSet:Fields("Menu_Action"):Value)
// I tied the following line but not working
* MENUITEM oRecSet:Fields("Menu_Text"):Value ACTION { || &cMenuAction }
// I tied the following line but not working
* MENUITEM oRecSet:Fields("Menu_Text"):Value ACTION &(cMenuAction)
MENUITEM oMnuItem PROMPT ALLTRIM(oRecSet:Fields("Menu_Text"):Value)
oMnuItem:bAction:={ || cMenuAction }
Result is action never get executed if I use { || cMenuAction }. No error but nothing happens
I get run time error If I try &(cMenuAction) variable does not exist cMenuAction
Regards
Anser