MenuItem.SetTag
---------------

Sets the tag of the menu.

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

MBS( "MenuItem.SetTag"; Item; Value ) 

**MBS**( **"MenuItem.SetTag";** /\* Sets the tag of the menu. \*/  
**$Item**; /\* The reference to the menu item. Please create one with [MenuItem.CreateMenuItem](MenuItemCreateMenuItem.md) or [MenuItem.CreateSeparator](MenuItemCreateSeparator.md). \*/   
**$Value**) /\* The new tag value.e.g. Get(RecordID) \*/ 

### 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 |
| Value | The new tag value. | Get(RecordID) |

### Result

Returns OK or error.

### Description

Sets the tag of the menu.  
See also [Menu.GetTag](MenuGetTag.md).  
With the tag, we allow you to associate a text with the menu item, for example a record ID.  
### See also

- [Menu.GetTag](MenuGetTag.md)
- [Menu.SelectedItem](MenuSelectedItem.md)
- [MenuItem.CreateSeparator](MenuItemCreateSeparator.md)
- [MenuItem.GetImage](MenuItemGetImage.md)
- [MenuItem.GetPath](MenuItemGetPath.md)
- [MenuItem.GetURL](MenuItemGetURL.md)
- [MenuItem.SetBold](MenuItemSetBold.md)
- [MenuItem.SetImage](MenuItemSetImage.md)
- [MenuItem.SetScriptAction](MenuItemSetScriptAction.md)
- [MenuItem.SetURL](MenuItemSetURL.md)

This function is free to use.

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

  
[MenuItem.SetSubMenu](MenuItemSetSubMenu.md) - [MenuItem.SetTitle](MenuItemSetTitle.md)

[HTML Version](MenuItemSetTag.shtml)