CNS Menu

Dynamic Menus

<- Back to CNS Menu function list

CNSMenu_GetMenuChoice

Description

This function will return the name or caption of the last menu item the user selected. If you have more than one menu item calling the same script in your database, you can use this function to determine which menu item was actually selected. If you specify a True value for the parameter, it will return the "full menu path" to the menu item the user selected. In other words, if you have a menu named "MyMenu", which contains a sub menu named "Colors", and the user selected the "Red" item in that sub menu, specifying True as the parameter will make this function return "MyMenu/Colors/Red" instead of just "Red".

Return Type
Text
Format
CNSMenu_GetMenuChoice ( GetFullPath )
Optional Parameters
  • GetFullPath

    If True, the full menu path to the chosen item will be returned. In other words, if you have a menu named "MyMenu", which contains a sub menu named "Colors", and the user selected the "Red" item in that sub menu, specifying True as the parameter will make this function return "MyMenu/Colors/Red" instead of just "Red".

Related Items
CNSMenu_GetMenuName, CNSMenu_GetMenuValue, CNSMenu_GetMouseButton, CNSMenu_GetMouseCoordinates
Example

Code:

CNSMenu_GetMenuChoice

Result:

Returns the name of the last menu item the user selected