PrintDialog.SetTray
-------------------

Sets the tray name the plugin should select.

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

MBS( "PrintDialog.SetTray"; Value ) 

**MBS**( **"PrintDialog.SetTray";** /\* Sets the tray name the plugin should select. \*/  
**$Value**) /\* The name of the tray to use.e.g. "Tray1" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Value | The name of the tray to use. | "Tray1" |

### Result

Returns OK or error.

### Description

Sets the tray name the plugin should select.  
Value may be Tray1, Tray2, tray-1, tray-2, auto, Left, Right, Lower, Middle, Upper and depends on the printer driver. This is not the name displayed in dialog, but the internal value which is the same for all localization.  
Same as using [PrintDialog.SetOption](PrintDialogSetOption.md) with "InputSlot" as key and tray name as value.  
  
Please print once with dialog to pick a tray and then query [PrintDialog.GetLastSettings](PrintDialogGetLastSettings.md) to lookup the internal tray name. Usually named InputSlot in the settings.  
  
Warning: For some users the dialog loads last settings and overwrite this settings, so you may need to not show dialog.  
### Examples

Set Tray-2 as the tray for paper:

 MBS ("PrintDialog.SetTray"; "Tray-2")  
### See also

- [PrintDialog.GetLastSettings](PrintDialogGetLastSettings.md)
- [PrintDialog.GetTray](PrintDialogGetTray.md)
- [PrintDialog.SetOption](PrintDialogSetOption.md)
- [PrintDialog.SetReset](PrintDialogSetReset.md)

### Blog Entries

- [Control printing in FileMaker with MBS Plugin on MacOS](https://www.mbsplugins.de/archive/2023-06-11/Control_printing_in_FileMaker_/monkeybreadsoftware_blog_filemaker)
- [How to fix the Sierra printing bug in FileMaker](https://www.mbsplugins.de/archive/2016-10-17/How_to_fix_the_Sierra_printing/monkeybreadsoftware_blog_filemaker)
- [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)

### FileMaker Magazin

- [Ausgabe 5/2017, Seite 22](https://filemaker-magazin.de/neuigkeit/3961-Appetithappen-FMM_201705)

This function checks for a license.

Created 10th February 2016 , last changed 8th December 2022

  
[PrintDialog.SetReverseOrder](PrintDialogSetReverseOrder.md) - [Printer.CancelJob](PrinterCancelJob.md)

[HTML Version](PrintDialogSetTray.shtml)