Dialog.SetFieldText
-------------------

Sets the text for a field.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Dialog](component_Dialog.md) | [6.4](newinversion64.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "Dialog.SetFieldText"; FieldIndex; Text ) 

**MBS**( **"Dialog.SetFieldText";** /\* Sets the text for a field. \*/  
**$FieldIndex**; /\* The index of the field.  
Range from 0 to 9.e.g. 0 \*/   
**$Text**) /\* The text for the field.e.g. "Hello" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| FieldIndex | The index of the field.   Range from 0 to 9. | 0 |
| Text | The text for the field. | "Hello" |

### Result

Returns OK or error.

### Description

Sets the text for a field.  
### See also

- [Dialog.GetFieldText](DialogGetFieldText.md)

### Release notes

- **Version 16.1**
    - Enabled [Dialog.ClearFields](https://www.mbsplugins.eu/DialogClearFields.shtml), [Dialog.AddField](https://www.mbsplugins.eu/DialogAddField.shtml), [Dialog.GetFieldText](https://www.mbsplugins.eu/DialogGetFieldText.shtml) and [Dialog.SetFieldText](https://www.mbsplugins.eu/DialogSetFieldText.shtml) functions for Windows since we got an alternative dialog with edit fields, which does most of our [dialog](https://www.mbsplugins.eu/component_Dialog.shtml) functions.

### Blog Entries

- [MBS FileMaker Plugin, version 16.1pr4](https://www.mbsplugins.de/archive/2026-02-20/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 6.4pr7](https://www.mbsplugins.de/archive/2016-09-14/MBS_FileMaker_Plugin_version_6/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 13th September 2016 , last changed 18th February 2026

  
[Dialog.SetDefaultButton](DialogSetDefaultButton.md) - [Dialog.SetIcon](DialogSetIcon.md)

[HTML Version](DialogSetFieldText.shtml)