IF function

Synopsis
This function returns a specified value if the given condition is TRUE. Otherwise it returns a second specified value.
Variations
IF(Condition, TrueValue, FalseValue)
Returns TrueValue or FalseValue based on Condition.
Parameters
Condition

Specifies the condition to verify.

Supported types: Boolean.
TrueValue

Specifies the value to return should Condition evaluate to TRUE.

Supported types: Numeric; Boolean; String; Object; Point.
FalseValue

Specifies the value to return should Condition evaluate to FALSE.

Supported types: Numeric; Boolean; String; Object; Point.
Returns
Returned types: Numeric; Boolean; String; Object; Point.
Examples
1.

The following example returns the first occurrence's X object, if any occurrences were found. Otherwise, returns 0.

IF(ModelFinder.TotalNumberFound > 0, ModelFinder.Occurences(1).X, 0)