Product Logo

CNS Menu

Dynamic Menus

Functions

CNSMenu_GetMenuChoice

NameCNSMenu_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 TypeText
FormatCNSMenu_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”.

Example
Example 1

Returns the name of the last menu item the user selected

CNSMenu_GetMenuChoice