KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Checking the type of field or variable
PRODUCT: 4D | VERSION: 2004.3 | PLATFORM: Mac & Win
Published On: January 27, 2006
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

You can check the type of a field or variable using the Type command. This command returns a number that designates the type of field or variable as it is declared. As shown in the example below, the value of vtype is 2 which denotes that variable t1 is declared as Text:

C_TEXT(t1)
C_INTEGER(vtype)
vtype:=Type(t1) ` returns value 2 w/c is a text type

Below is a link to 4th Dimension predefined constants:
https://www.4d.com/docs/CMU/CMU00295.HTM