Supported Operators
You can use these operators in calculated fields:
- Addition (+)
- Subtraction (−)
- Multiplication (*)
- Division (/)
- Modulo (%)
- Power (^)
- Equal (=)
- Not equal (<>)
- Greater than (>)
- Greater than or equal to (>=)
- Less than (<)
- Less than or equal to (<=)
- AND
- OR
- NOT
=
) and Not equal (<>
) comparisons are case-sensitive.You can apply these mathematical functions to an expression:
Mod(number, divisor)
– Finds the remainder after dividing a number by a divisor.Log(expression)
– Returns the base 10 logarithm of a given expression.Ln(expression)
– Returns the natural logarithm of a given expression.Abs(expression)
– Returns the absolute value of a given expression.Sqrt(expression)
– Returns the square root of a given expression.Exp(expression)
– Returns the base of the natural logarithm (e) raised to the power of a given expression.
To make lengthy calculations easier to read, you can use parentheses to clarify groupings and precedence in calculations. In the following statement, you do not need parentheses. The multiplication statement is processed first, and then the result is added to five, returning a value of 26. However, parentheses make the statement easier to read and maintain.
5 + (7 * 3)
Because parentheses are first in the order of operations, you can also use them to change the order in which operators are applied. For example, in the following statement, the addition is processed first, and then the result is multiplied by 3, returning a value of 36.
(5 + 7) * 3
Examples of Using Operators
- Multiple arithmetic operators
- This example uses multiple arithmetic operators to subtract the number of black-and-white
and single-color copier clicks from the total number of copier clicks:
{All Copier Clicks} - ({Black & White Copier Clicks} + {Single-Color Copier Clicks})
- (/) Division
- The following example uses division to divide 3 by 2. A value of 1.5 is returned.
RICOH Supervisor uses floating point divisions.
3/2
- (=) Equal
- The Equal symbol (
=
) lets you perform a case-sensitive comparison of values. Rows where the comparison isTRUE
are included in the result set.In the following example, the rows where the Location field is South are included in the results. The rows where the Location is south are excluded.
{Location Name} = 'South'
- (<>) Not equal
- The Not equal symbol (
<>
) checks if a field has any value other than a specified value.For example,
x<>1
checks if x is any value other than 1.Note: Always use<>
, not!=
.This example returns the rows where the number of printed copies is not equal to 10:
{Printed Copies} <> 10
- (^) Power
- You can use the power symbol
^
with any numeric field, with any valid exponent.The following example is a simple expression of 2 to the power of 4. It returns a value of 16.
2^4
- AND, OR, and NOT
- The following example uses
AND
,OR
, andNOT
to compare multiple expressions. It uses conditional operators to find printers that are not in the North or South locations and that printed more than 1000 pages. When no results are returned, the valuen/a
is used.ifelse(( (NOT ({Location Name} = 'North' OR {Location Name} = 'South')) AND {Printed Pages} > 1000), {Printer Name}, 'n/a')
- Comparison lists (in or not in)
-
This example returns rows where x is in the list (1, 2, 3):
x = 1 OR x = 2 OR x = 3
This example returns rows where x is not in the list (1, 2, 3):
NOT(x = 1 OR x = 2 OR x = 3 )
- Between comparison
- The following example returns rows where the job end time is between the first day
and last day of 2023. To include the first and last day,
or equal to
is used for the comparison operators.{Job End Time} >= "1/1/2023" AND {Job End Time} <= "12/31/2023"