FTYPE( ) function

Returns a character identifying the data category of a field or variable, or the type of an ACL project item.





Character. A quoted field name, variable name, or ACL project item name.


Character. This function returns one of the following characters, which indicates the field, variable, or ACL project item type:


The following example assigns a value of 4 to the num variable and then checks the type. The value returned is n for a Numeric variable.

num = 4

If you have a script or analytic that requires a numeric Amount field, you need to test that the field is the correct type before running the script. The following command only runs Script_1 if Amount is a Numeric field.

OPEN Invoices
DO Script_1 IF FTYPE("Amount") = "N"

You can also use the function to test if a particular table or other ACL project item is present in a project. The following command only runs Script_1 if a table named Invoices is present in the project.

DO Script_1 IF FTYPE("Invoices") <> "U"

(C) 2015 ACL Services Ltd. All Rights Reserved.