![]() |
Next Page |
| Contents > Functions reference (alphabetical list) > Logical functions > If function |
|
|
| If function |
| Format |
If(test;result1;result2) |
| Parameters |
| test - any numeric value or logical expression |
| result1 - expression or field name |
| result2 - expression or field name |
| Data type returned |
| text, number, date, time, timestamp, container |
| Description |
| Returns one of two possible results depending on the value of test. If test is True (any non-zero numeric result), FileMaker Pro returns result1. If test is False (0), result2 is returned. Test must be an expression that returns either a numeric or Boolean (True, False) result. |
| Notes |
| If you have more than two possible results, consider using the Case function. |
| Examples |
| If(State ="CA";Subtotal * CA Tax Rate;0) returns the tax if the purchaser is a resident of California, otherwise returns 0. |
| Related topics |
| Functions reference (category list) |
| Functions reference (alphabetical list) |
| About formulas |
| About functions |
| Defining calculation fields |
| Using operators in formulas |
|
|
| Contents > Functions reference (alphabetical list) > Logical functions > If function | Next Page |