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 Specifications

FileMaker 8 Product Line

Specifications and Storage Limits

Field Types and Import/Export Formats

: Calculation Functions

Working with Calculations Primer

Calculation Signatures

Calculation Functions

: Custom Functions

Custom Functions Primer

Useful Custom Functions

: Script Steps

Scripting Primer

Script Step Reference

: Quick Reference

FileMaker Error Codes

FileMaker Keyboard Shortcuts

FileMaker Network Ports

FileMaker Server Command Line Reference

FileMaker XML Reference

: Other Resources

Where to Go for More Information



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

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