MenuItem.SetSubMenu
-------------------

Sets the submenu of the menu item.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Menu](component_Menu.md) | [4.1](newinversion41.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "MenuItem.SetSubMenu"; Item; submenu ) 

**MBS**( **"MenuItem.SetSubMenu";** /\* Sets the submenu of the menu item. \*/  
**$Item**; /\* The reference to the menu item. Please create one with [MenuItem.CreateMenuItem](MenuItemCreateMenuItem.md) or [MenuItem.CreateSeparator](MenuItemCreateSeparator.md). \*/   
**$submenu**) /\* The reference to the menu. Please create one with [Menu.CreateMenu](MenuCreateMenu.md). \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Item | The reference to the menu item. Please create one with [MenuItem.CreateMenuItem](MenuItemCreateMenuItem.md) or [MenuItem.CreateSeparator](MenuItemCreateSeparator.md). | $item |
| submenu | The reference to the menu. Please create one with [Menu.CreateMenu](MenuCreateMenu.md). | $submenu |

### Result

Returns OK or error.

### Description

Sets the submenu of the menu item.  
See also [MenuItem.GetSubMenu](MenuItemGetSubMenu.md).  
### See also

- [Menu.CreateMenu](MenuCreateMenu.md)
- [MenuItem.CreateMenuItem](MenuItemCreateMenuItem.md)
- [MenuItem.CreateSeparator](MenuItemCreateSeparator.md)
- [MenuItem.GetSubMenu](MenuItemGetSubMenu.md)
- [MenuItem.HasSubmenu](MenuItemHasSubmenu.md)
- [MenuItem.SetHidden](MenuItemSetHidden.md)
- [MenuItem.SetState](MenuItemSetState.md)

### FileMaker Magazin

- [Ausgabe 2/2021, Seite 29](https://filemaker-magazin.de/neuigkeit/4132-Appetithappen-FMM_202102)

This function checks for a license.

Created 18th August 2014 , last changed 31st August 2014

  
[MenuItem.SetStrikeOut](MenuItemSetStrikeOut.md) - [MenuItem.SetTag](MenuItemSetTag.md)

[HTML Version](MenuItemSetSubMenu.shtml)