Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
MenuItem.GetTag
Queries the tag value of the menu.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| Menu | 4.1 | Yes | Yes | No | No | No |
Parameters
| Parameter | Description | Example |
|---|---|---|
| item | The reference to the menu item. Please create one with MenuItem.CreateMenuItem or MenuItem.CreateSeparator. | $item |
Result
Returns value or error.
Description
Queries the tag value of the menu.See also Menu.SetTag.
With the tag, we allow you to associate a text with the menu item, for example a record ID.
Examples
Show menu and show selection:
Set Variable [$menu; Value:MBS("Menu.CreateMenu")]
# create menu items...
Set Variable [$item; Value:MBS("MenuItem.CreateMenuItem"; "Hello World")]
Set Variable [$r; Value:MBS("MenuItem.SetTag"; $item; "secret value")]
Set Variable [$r; Value:MBS("Menu.AddItem"; $menu; $item)]
#
#show menu
Set Variable [$m; Value:MBS("Menu.PopUp"; $Menu; "mouse")]
#
#you selected something?
If [$m = 1]
Set Variable [$selectedItem; Value:MBS("Menu.SelectedItem"; $menu)]
Set Variable [$selectedTitle; Value:MBS("MenuItem.GetTitle"; $selectedItem)]
Set Variable [$selectedTag; Value:MBS("MenuItem.GetTag"; $selectedItem)]
#
Show Custom Dialog ["Auswahl"; $selectedItem & ¶ & $selectedTitle & ¶ & $selectedTag]
End If
Set Variable [$m; Value:MBS("Menu.Release"; $Menu; 1)]
See also
- Menu.PopUp
- Menu.Release
- Menu.SelectedItem
- Menu.SetTag
- MenuItem.CreateMenuItem
- MenuItem.GetImage
- MenuItem.GetState
- MenuItem.GetTitle
- MenuItem.SetImage
- MenuItem.SetURL
Example Databases
Created 18th August 2014, last changed 7th April 2016
MenuItem.GetSubMenu - MenuItem.GetTitle
Feedback: Report problem or ask question.
Links
MBS FileMaker Plugins