GetAsBoolean()

Category: Data

Syntax: GetAsBoolean ( data )

Parameters:

dataAny text, number, date, time, timestamp, or container, or a string containing text, a number, date, time, timestamp, or container.

Data type returned: Number

Description:

Returns a 1 if the expression or data passed into the function is not zero nor empty, otherwise zero and null values return 0.

GetAsBoolean() is somewhat different than the also common test not IsEmpty ( data ). The important distinction is that a GetAsBoolean() test will treat zero as a false result.

Examples:

Function

Results

GetAsBoolean ( myField ) where myField = "hello":

Returns 1.

GetAsBoolean ( myField ) where myField = -1000:

Returns 1.

GetAsBoolean ( myField ) where myField = 0:

Returns 0.

GetAsBoolean ( myField ) where myField is empty:

Returns 0.







FileMaker 8 Functions and Scripts Desk Reference
FileMaker 8 Functions and Scripts Desk Reference
ISBN: 0789735113
EAN: 2147483647
Year: 2004
Pages: 352
Simiral book on Amazon

Flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net