FTYPE( ) function

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

Syntax

FTYPE(field_name_string)

Parameters

field_name_string

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

Output

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

Examples

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
FTYPE("num")

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) 2013 ACL Services Ltd. All Rights Reserved. | Send feedback