# Maths functions

## IF – Test if any arguments are true

774 views June 1, 2018 July 27, 2018 admin 2

## Overview

Evaluate a condition, returning TRUE/FALSE or optional values

## Syntax

IF(Operand1, ‘Operator’, Operand2, ‘TrueValue’, ‘FalseValue’)

IF(FIELDSTR(Price), ‘>’, 10, ‘Greater than 10′, ‘Less than or equal to 10’)

IF(FIELDSTR(Price), ‘>’, 10)

Element Description
Operand1 The first field or value to compare.
Operator

The operator to use in the comparison – valid operands are:

< Less than

> Greater than

= Equal to

<= Less than or equal to

= Greater than or equal to

<> Not equal to

Operand2 The second field or value to compare.
TrueValue The value to output if the comparsion evaluates to true (optional).
FalseValue The value to output if the comparsion evaluates to false (optional).

## Example

IF(FIELDSTR(Price), ‘>’, 10, ‘Greater than 10’, ‘Less than or equal to 10′)

In this example, for all values that are greater than 10, ‘Greater than 10’ is displayed. For all values that equal to or less than 10, ‘Less than or equal to 10’ is displayed.