PrintDialog.GetTray
-------------------

Queries tray name.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [PrintDialog](component_PrintDialog.md) | [6.1](newinversion61.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |

MBS( "PrintDialog.GetTray" { ; LastTray } ) 

**MBS**( **"PrintDialog.GetTray";** /\* Queries tray name. \*/  
**$LastTray**) /\* Optional; Pass 1 to return the last tray name used by print dialog.  
This allows you use the print dialog and than see what value is used internally for the tray you selected.  
Pass 0 to get the text you passed to [PrintDialog.SetTray](PrintDialogSetTray.md).e.g. 0 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| LastTray | Pass 1 to return the last tray name used by print dialog.   This allows you use the print dialog and than see what value is used internally for the tray you selected.   Pass 0 to get the text you passed to [PrintDialog.SetTray](PrintDialogSetTray.md). | 0 | Optional |

### Result

Returns text or error.

### Description

Queries tray name.  
### Examples

Query last tray selection from dialog:

 MBS ( "PrintDialog.GetTray"; 1 )  
### See also

- [PDFKit.SetPrintSetting](PDFKitSetPrintSetting.md)
- [PrintDialog.GetReset](PrintDialogGetReset.md)
- [PrintDialog.SetTray](PrintDialogSetTray.md)

### Blog Entries

- [Printing with FileMaker on Mac with a specific Paper Tray](https://www.mbsplugins.de/archive/2016-02-16/Printing_with_FileMaker_on_Mac/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 10th February 2016 , last changed 11st February 2016

  
[PrintDialog.GetReverseOrder](PrintDialogGetReverseOrder.md) - [PrintDialog.Install](PrintDialogInstall.md)

[HTML Version](PrintDialogGetTray.shtml)