FileDialog.SetNameFieldStringValue
----------------------------------

Sets the filename in the name field to the specified value.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [FileDialog](component_FileDialog.md) | [2.7](newinversion27.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "FileDialog.SetNameFieldStringValue"; Text ) 

**MBS**( **"FileDialog.SetNameFieldStringValue";** /\* Sets the filename in the name field to the specified value. \*/  
**$Text**) /\* The initial text for the name field. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Text | The initial text for the name field. |  |

### Result

Returns OK.

### Description

Sets the filename in the name field to the specified value.  
This value is only used for save dialogs.  
  
Added Windows support in plugin version 8.3 for Windows Vista or newer.  
### Examples

Sets name:

 MBS ( "FileDialog.SetNameFieldStringValue"; "test.txt" )  
### See also

- [FileDialog.GetNameFieldStringValue](FileDialogGetNameFieldStringValue.md)
- [FileDialog.OpenFileDialog](FileDialogOpenFileDialog.md)
- [FileDialog.SaveFileDialog](FileDialogSaveFileDialog.md)
- [FileDialog.SelectFolderDialog](FileDialogSelectFolderDialog.md)
- [FileDialog.SelectItemDialog](FileDialogSelectItemDialog.md)
- [XL.Book.SaveToFile](XLBookSaveToFile.md)

### Example Databases

- [DynaPDF/Form/Form](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Form/Form.shtml#4ScriptAnchor_)
- [Files/FileDialog](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Files/FileDialog.shtml#1ScriptAnchor_)
- [XL/Writing data](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/XL/Writing%20data.shtml#6ScriptAnchor_)

### Blog Entries

- [PDF Forms with MBS Plugin](https://www.mbsplugins.de/archive/2018-04-21/PDF_Forms_with_MBS_Plugin/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 1/2022, Seite 20](https://filemaker-magazin.de/neuigkeit/4172-Appetithappen-FMM_202201)

This function is free to use.

Created 18th August 2014 , last changed 24th May 2018

  
[FileDialog.SetNameFieldLabel](FileDialogSetNameFieldLabel.md) - [FileDialog.SetPrompt](FileDialogSetPrompt.md)

[HTML Version](FileDialogSetNameFieldStringValue.shtml)