# Dialog.StrMenu(Text [, Integer] [, Text]) Method
> Version: _Available or changed with runtime version 1.0._
Creates a menu window that displays a series of options.
## Syntax
```al
OptionNumber :=   Dialog.StrMenu(OptionMembers: Text [, DefaultNumber: Integer] [, Instruction: Text])
```
> NOTE
> This method can be invoked without specifying the data type name.
## Parameters
OptionMembers
Type: ../text/text-data-type
A comma-separated string. Each substring in OptionString specifies an option on the menu. The string can be a label that is enabled for multilanguage functionality.
*[Optional] DefaultNumber*
Type: ../integer/integer-data-type
Use this optional parameter to determine a default option, which is highlighted. The options are numbered 1, 2, 3, 4, and so on. If you omit this optional parameter, the first option (1) is used as the default.
*[Optional] Instruction*
Type: ../text/text-data-type
Use this optional parameter to add a description to the option values.
## Return Value
OptionNumber
Type: ../integer/integer-data-type
The number of the menu option that the user selected. If the user presses the Esc key to exit the menu, zero (0) is returned.
## Example
This example shows how to use the Dialog.StrMenu method.
```al
var
    Options: Text[30];
    Selected: Integer;
    Text000: Label 'Save,Delete,Exit,Find';
    Text001: Label 'You selected option %1.';
    Text002: Label 'Choose one of the following options:';
begin
    Options := Text000;
    // Sets the default to option 3
    Selected := Dialog.StrMenu(Options, 3, Text002);
    Message(Text001, Selected);
end;
```
The menu window displays the following text:
Choose one of the following options:
Save
Delete
Exit
Find
Option 3, Exit, is highlighted. The option that the user selects is stored in the variable Selected. The user receives following message:
You selected option 3.
## Related information
dialog-data-type
Get Started with AL<../../devenv-get-started>
Developing Extensions<../../devenv-dev-overview>

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/dialog/dialog-strmenu-method, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/dialog/dialog-strmenu-method/
