FM.TextWithDataType
-------------------

Returns a new value with given type annotation.

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

MBS( "FM.TextWithDataType"; Text; DataType ) 

**MBS**( **"FM.TextWithDataType";** /\* Returns a new value with given type annotation. \*/  
**$Text**; /\* The text to use. \*/   
**$DataType**) /\* The new data type.  
Can be Number, Container, Date, Time, TimeStamp or Text.e.g. "Text" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Text | The text to use. |  |
| DataType | The new data type.   Can be Number, Container, Date, Time, TimeStamp or Text. | "Text" |

### Result

Returns OK or error.

### Description

Returns a new value with given type annotation.  
This is a very special function to create values you would normally never have in FileMaker.  
### Examples

Make "Hello" a time and check it:

 MBS ("[FM.DataType](FMDataType.md)"; MBS ("FM.TextWithDataType"; "Hello"; "time"))  
<small>  
Example result: time</small>### See also

- [FM.DataType](FMDataType.md)

### Release notes

- **Version 13.1**
    - Added [FM.TextWithDataType](https://www.mbsplugins.eu/FMTextWithDataType.shtml) function.

### Blog Entries

- [New in MBS FileMaker Plugin 13.1](https://www.mbsplugins.de/archive/2023-03-15/New_in_MBS_FileMaker_Plugin_13/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 13.1pr1](https://www.mbsplugins.de/archive/2023-02-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 21st January 2023 , last changed 21st January 2023

  
[FM.TableStatistics](FMTableStatistics.md) - [FM.UpdateRecord](FMUpdateRecord.md)

[HTML Version](FMTextWithDataType.shtml)