FM.SetThreadName
----------------

Sets a new name for a thread.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [FM](component_FM.md) | [6.0](newinversion60.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "FM.SetThreadName"; Name ) 

**MBS**( **"FM.SetThreadName";** /\* Sets a new name for a thread. \*/  
**$Name**) /\* The new name for the thread.e.g. "MyScript" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Name | The new name for the thread. | "MyScript" |

### Result

Returns OK or error.

### Description

Sets a new name for a thread.  
On FileMaker Server each script is performed in a thread. You can use this function to name this thread. Then on a crash report you may find this name and than you can see which script may cause the problem.  
This function is free to use.

Created 13th December 2015 , last changed 3th April 2021

  
[FM.SetSQLBatchMode](FMSetSQLBatchMode.md) - [FM.StopScriptIdle](FMStopScriptIdle.md)

[HTML Version](FMSetThreadName.shtml)