Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
11.4
11.5
12.0
12.1
12.2
12.3
12.4
12.5
13.0
13.1
Statistic
FMM
Blog
FM.DataType
Returns data type of argument.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
FM | 6.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameters
Parameter | Description | Example |
---|---|---|
Value | The value to check. | $test |
Result
Returns type or error.
Description
Returns data type of argument.The type can be container, boolean, date, empty, number, text, time, timestamp or unknown.
Empty variables show as text.
You should never see unknown, boolean or empty as those are not present in normal FileMaker use.
Examples
Checks variable data type:
MBS( "FM.DataType"; $test )
Check data type for timestamp:
MBS( "FM.DataType"; Get(CurrentTimeStamp) )
Example result: timestamp
Check data type for container:
MBS( "FM.DataType"; MBS( "Text.WriteToContainer"; "Hello" ) )
Example result: container
Check data type for time:
MBS( "FM.DataType"; Get(CurrentTime) )
Example result: time
Check data type for date:
MBS( "FM.DataType"; Get(CurrentDate) )
Example result: date
Check data type for text:
MBS( "FM.DataType"; "Hello" )
Example result: text
Check data type for number:
MBS( "FM.DataType"; 123 )
Example result: number
See also
- FM.ExecuteFileSQLValue
- FM.TextWithDataType
- Matrix.ConvertDataType
- Matrix.GetValue
- Text.WriteToContainer
Example Databases
Blog Entries
This function does not need a paid license.
Created 9th February 2016, last changed 19th November 2021
