formulaidentfiers(
FORMULA
)

The formulaidentfiers( function returns a list of identifiers (fields and variables) used in a formula.


Parameters

This function has one parameter:

formula – is the formula to be analyzed. If the formula is specified inline in the function itself, it must be quoted (see Quotes). Otherwise, you can pre-store the formula in a field or variable.


Description

The function returns a list of identifiers (fields and variables) used in a formula. The list is returned as a carriage return delimited text array.

For example,

formulaidentifiers({alpha+cr()+bravo+sqr(Price)+upper(Name)})

will return the four identifiers that appear in this formula:

alpha
bravo
Price
Name

Note that this function doesn’t check to see if each identifier is a field or a variable, or even if it exists at all. It simply analyzes the text of the formula to produce the list. Here is one way you could check the list for undefined identifiers.

let items = formulaidentifiers({alpha+cr()+bravo+sqr(Price)+upper(Name)})
looparray items,cr(),item
    let itemtype = catcherror("",datatype(item))
    if itemtype = ""
        message item+" does not exist."
    endif
endloop

See Also


History

VersionStatusNotes
10.2NewNew in this version.