Window.Parent
-------------

Queries the reference number of parent window.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Window](component_Window.md) | [13.5](newinversion135.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "Window.Parent"; WindowRef ) 

**MBS**( **"Window.Parent";** /\* Queries the reference number of parent window. \*/  
**$WindowRef**) /\* Window Reference is the unique OS level window ID. You can obtain this by using the [Window.FindByTitle](WindowFindByTitle.md) or [Window.FindByIndex](WindowFindByIndex.md) functions. Pass zero to access the frontmost window.e.g. 0 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| WindowRef | Window Reference is the unique OS level window ID. You can obtain this by using the [Window.FindByTitle](WindowFindByTitle.md) or [Window.FindByIndex](WindowFindByIndex.md) functions. Pass zero to access the frontmost window. | 0 |

### Result

Returns number or error.

### Description

Queries the reference number of parent window.  
Can be used to query parent for a card window or dialog.  
### Examples

Try this in a card window:

 Let ( \[  
pw = MBS ("Window.Parent"; 0);   
ct = MBS ("[Window.GetTop](WindowGetTop.md)"; 0);  
wt = MBS ("[Window.GetTop](WindowGetTop.md)"; pw);  
cn = MBS ("[Window.GetTitle](WindowGetTitle.md)"; 0);  
wn = MBS ("[Window.GetTitle](WindowGetTitle.md)"; pw)  
  
\]; cn &amp; ¶ &amp; ct &amp; ¶ &amp; wn &amp; ¶ &amp; wt )  
### See also

- [Window.Current](WindowCurrent.md)
- [Window.FindByIndex](WindowFindByIndex.md)
- [Window.FindByTitle](WindowFindByTitle.md)
- [Window.GetTitle](WindowGetTitle.md)
- [Window.GetTop](WindowGetTop.md)

### Release notes

- **Version 13.5**
    - Added [Window.Parent](https://www.mbsplugins.eu/WindowParent.shtml) function.

### Blog Entries

- [New in MBS FileMaker Plugin 13.5](https://www.mbsplugins.de/archive/2023-11-28/New_in_MBS_FileMaker_Plugin_13/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 13.5pr1](https://www.mbsplugins.de/archive/2023-09-26/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 20th September 2023 , last changed 20th September 2023

  
[Window.Move](WindowMove.md) - [Window.PositionNextDialog](WindowPositionNextDialog.md)

[HTML Version](WindowParent.shtml)