Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

FM.DataType

Returns data type of argument.

Component Version macOS Windows Linux Server iOS SDK
FM 6.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "FM.DataType"; Value )   More

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

Example Databases

Blog Entries

This function is free to use.

Created 9th February 2016, last changed 19th November 2021


FM.CustomFunctionsList - FM.DataViewerContent