sc_appmenu_exist_item("Menu_Name", "Id_Item")

The sc_appmenu_exist_item() macro checks if a menu item exists in a dynamic menu structure previously created with sc_appmenu_create(). It returns a boolean value: true if the item exists, or false otherwise.

Parameters

Parameter Description
Menu_Name Name of the menu application.
Id_Item Identifier of the menu item to check.

Example


// Example: Check if item_2 exists in "menu_main"
// If it exists, update it; otherwise, add it

if (sc_appmenu_exist_item("menu_main", "item_2")) {
  sc_appmenu_update_item("menu_main", "item_2", "item_1", "Category Form", "form_category");
} else {
  sc_appmenu_add_item("menu_main", "item_2", "item_1", "Category Form", "form_category");
}