Maptitude Help / Formulas, Conditions, and Functions / Building a Formula or Condition
Building a Formula or Condition
You build a formula or condition using the following three basic elements:
- Operands are the numbers or strings that the formula or condition operates upon
- Operators are the symbols that tell Maptitude what to do with operands in a formula or condition
- Separators are the signposts that tell Maptitude how to combine various operators and operands into a formula or condition
Operands
An operand may be a number, a string, or a field name, or it may be the result of another formula, a condition, or a function. Here are some examples:
| Operand | Description |
|---|---|
| 7 | An integer constant |
| 1.5 | A real number constant, shown with a decimal point |
| 3.776E+12 | A real number constant, shown with exponential notation |
| “highway” | A string constant |
| ‘post32’ | Another string constant – you can use single or double quotes around strings, as long as they match |
| Population | The value of the Population field |
| State.Income | The value of the Income field in the State dataview |
| Value(Address) | The numeric value of the house number at the beginning of the character (string) field Address, or zero if the field does not start with one or more digits |
| HHI between 10000 and 25000 | True (1) if the number in the HHI field is in the range from 10,000 to 25,000, False (0) otherwise |
Conditions can be treated either as having a logical value (True or False) or has having a numerical value (1 or 0) when using conditions with other operands.
Operators
The operators in Maptitude are in four groups: mathematical, relational, logical, and string.
- Arithmetic operators are for doing addition, subtraction, multiplication and division, plus identifying values as positive or negative. The result of an operator is a numerical value, either an integer value if the result is a whole number or a real value if the result is a decimal number.
- Relational operators are for comparing numerical or string values. Most work with numerical and string values, while two are for strings only. The result of an operator is a logical value.
- Logical operators are used with operands that have a value of True or False. The result of an operator is a logical value.
- The String operator is used to combine two strings into one. The result of the operator is a string value.
Here are the operators:
| Arithmetic operators | |
|---|---|
| + | addition, or identification of a value as positive |
| – | subtraction, or identification of a value as negative |
| * | multiplied by |
| / | divided by |
| Logical operators | |
|---|---|
| and (or &) | both parts of the expression must be true |
| or (or |) | at least one part of the expression must be true |
| not (or !) | not (changes True expression to False or vice versa) |
| Relational operators | |
|---|---|
| = (or eq) | equals |
| <> (or != or ne) | is not equal to |
| < (or lt) | is less than |
| > (or gt) | is greater than |
| <= (or le) | is less than or equal to |
| >= (or ge) | is greater than or equal to |
| between...and... | is greater than or equal to one expression and less than or equal to the other |
| like (or ?) | string equals (with wildcards) |
| contains | string contains the character sequence |
| String operator | |
|---|---|
| + | string concatenation |
Separators
Separators define the limits of a part of a condition or formula. Separators used in Maptitude include:
- Square brackets [] – A field name can include spaces or special characters. To make clear the limits of the field name, any field name that includes one or more spaces or other special characters must be placed in square brackets. You can also place a single-word field name in square brackets, although it is not necessary. If a field name starts with a digit or is the word “do,” “if,” “return,” “not,” “null,” “runmacro,” or “rundbox,” it also will be placed in square brackets.
- Parentheses () – You can use parentheses in complex formulas to tell Maptitude the order in which you want the formula evaluated. See How Maptitude Calculates a Formula for more details.
©2026 Caliper Corporation