ListDialog.ShowDialog
---------------------

Shows the dialog.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [ListDialog](component_ListDialog.md) | [4.2](newinversion42.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ✅ Yes |

MBS( "ListDialog.ShowDialog" { ; TopMost } ) 

**MBS**( **"ListDialog.ShowDialog";** /\* Shows the dialog. \*/  
**$TopMost**) /\* Optional; Whether the dialog will get top most flag on Windows.  
Pass 1 to make it topmost, pass 0 or nothing for normal behavior. \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| TopMost | Whether the dialog will get top most flag on Windows.   Pass 1 to make it topmost, pass 0 or nothing for normal behavior. |  | Optional      Added in version **10.1**. |

### Result

Returns OK, Other, Cancel or error.

### Description

Shows the dialog.  
Returns the OK, Other, or Cancel to indicate which button was used to close the dialog.  
  
Due to a bug in 15.2, it returns "Select" unless changed with [ListDialog.SetSelectButtonValue](ListDialogSetSelectButtonValue.md) function.  
  
Added iOS support in version 15.3.  
### Examples

Shows a dialog:

 Set Variable \[$r ; Value:MBS ("[ListDialog.ClearList](ListDialogClearList.md)")\]  
Set Variable \[$r ; Value:MBS ("[ListDialog.SetPrompt](ListDialogSetPrompt.md)"; "Please select an item:")\]  
Set Variable \[$r ; Value:MBS ("[ListDialog.AddItemToList](ListDialogAddItemToList.md)"; "First Item"; "1234")\]  
Set Variable \[$r ; Value:MBS ("[ListDialog.SetAllowMultipleSelection](ListDialogSetAllowMultipleSelection.md)"; 1)\]  
Set Variable \[$r ; Value:MBS ("[ListDialog.SetSelectedTitle](ListDialogSetSelectedTitle.md)"; "1234")\]  
Set Variable \[$r ; Value:MBS ("ListDialog.ShowDialog")\]  
Set Field \[ListDialog::Result ; $r \]  
Set Field \[ListDialog::Selected Tag; MBS ("[ListDialog.GetSelectedTag](ListDialogGetSelectedTag.md)")\]  
Set Field \[ListDialog::Selected ; MBS ("[ListDialog.GetSelectedTitle](ListDialogGetSelectedTitle.md)")\]  
### See also

- [List.HasValue](ListHasValue.md)
- [ListDialog.AddItemsToList](ListDialogAddItemsToList.md)
- [ListDialog.AddItemToList](ListDialogAddItemToList.md)
- [ListDialog.GetSelectedTag](ListDialogGetSelectedTag.md)
- [ListDialog.GetSelectedTitle](ListDialogGetSelectedTitle.md)
- [ListDialog.SetAllowMultipleSelection](ListDialogSetAllowMultipleSelection.md)
- [ListDialog.SetFilter](ListDialogSetFilter.md)
- [ListDialog.SetSelectButtonValue](ListDialogSetSelectButtonValue.md)
- [ListDialog.SetSelectedTitle](ListDialogSetSelectedTitle.md)
- [SyntaxColoring.AddContextMenuCommand](SyntaxColoringAddContextMenuCommand.md)

### Release notes

- **Version 15.2**
    - Added [ListDialog.SetCancelButtonValue](https://www.mbsplugins.eu/ListDialogSetCancelButtonValue.shtml), [ListDialog.SetOtherButtonValue](https://www.mbsplugins.eu/ListDialogSetOtherButtonValue.shtml) and [ListDialog.SetSelectButtonValue](https://www.mbsplugins.eu/ListDialogSetSelectButtonValue.shtml) to set what value is returned by [ListDialog.ShowDialog](https://www.mbsplugins.eu/ListDialogShowDialog.shtml) function.
- **Version 13.5**
    - Changed [ListDialog.ShowDialog](https://www.mbsplugins.eu/ListDialogShowDialog.shtml) to allow two line prompt line.

### Example Databases

- [List/ListDialog Grouping](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/List/ListDialog%20Grouping.shtml#1ScriptAnchor_)
- [List/ListDialog](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/List/ListDialog.shtml#1ScriptAnchor_)
- [Mac and iOS/PDFKit/PDFKit Print Documents](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/PDFKit/PDFKit%20Print%20Documents.shtml#3ScriptAnchor_)
- [SmartCard/Belgian EID Reader](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/SmartCard/Belgian%20EID%20Reader.shtml#6ScriptAnchor_)
- [Win Only/Snippets for Windows](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Win%20Only/Snippets%20for%20Windows.shtml#11ScriptAnchor_)

### Blog Entries

- [ListDialog for iOS](https://www.mbsplugins.de/archive/2025-08-18/ListDialog_for_iOS/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 15.2pr2](https://www.mbsplugins.de/archive/2025-04-07/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Advent calendar - Door 10 - Reading The Wish List](https://www.mbsplugins.de/archive/2024-12-10/MBS_FileMaker_Advent_calendar_/monkeybreadsoftware_blog_filemaker)
- [MBS Plugin Advent calendar: 22 - ListDialog](https://www.mbsplugins.de/archive/2023-12-22/MBS_Plugin_Advent_calendar_22_/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 13.5pr4](https://www.mbsplugins.de/archive/2023-10-16/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [New functions of the MBS Plugin Version 9.5](https://www.mbsplugins.de/archive/2019-11-21/New_functions_of_the_MBS_Plugi/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 18th August 2014 , last changed 20th May 2025

  
[ListDialog.SetWindowTitle](ListDialogSetWindowTitle.md) - [ListDialog.Sort](ListDialogSort.md)

[HTML Version](ListDialogShowDialog.shtml)