Math Functions

<< Click to Display Table of Contents >>

 >Collect > Collect Enterprise > Form Designer Page > Formula Builder > Functions >

Math Functions

The Math functions are only able to compute integer and decimal data. Within EQuIS Collect, the functions perform mathematical calculations as data are entered in forms on the Mobile app. Within EQuIS Link, the functions provide a means to transform data when loading to a selected format.  

 

Below is a descriptive list of each math function and its operations. The examples are applicable to either fields in a Collect form or an EQuIS Link data source, unless otherwise noted.

ABS

The ABS function calculates the absolute value of a specific parameter.

ABS(<NumericParameter_1>)

Aggregate = No

 

Example

FieldA

-4

 

ABS([FieldA]) = 4

This formula is calculating the absolute value of FieldA.

ADD

The ADD function adds the list of specified parameters together.

ADD(<NumericParameter_1>,<NumericParameter_2>…<NumericParameter_N>)

Aggregate = No

 

Example

FieldA

FieldB

FieldC

4

6

2

 

ADD([FieldA],[FieldB],[FieldC]) = 12

This formula is adding FieldA, FieldB, and FieldC together.

AVG

The AVG function returns the average of all specified parameters in all rows.

AVG(<NumericParameter_1>,<NumericParameter_2>…<NumericParameter_N>)

Aggregate = Yes

 

Example 1 – Collect Form1

FieldA

4

6

2

 

AVG([form1.FieldA]) = 4

This formula is calculating the average value of all rows from FieldA on Form1.

 

Example 2 – Collect Form1

FieldA

FieldB

4

8

6

3

2

4

 

AVG([form1.FieldA],[form1.FieldB]) = 4.5

This formula is calculating the average value of all rows from FieldA and FieldB on Form1.

 

COS

The COS function calculates the cosine of the specified angle.

COS(<NumericParameter_1>)

Aggregate = No

 

Example

FieldA

15

 

COS([FieldA]) = 0.965925826

This formula is calculating the cosine of FieldA.

COSH

The COSH function calculates the hyperbolic cosine of the specified angle. The angle must be in radians.

COSH(<NumericParameter_1>)

Aggregate = No

 

Example

FieldA

0.1

 

COSH([FieldA]) = 1.00500416805580

This formula is calculating the hyperbolic cosine of FieldA.

DIVIDE

The DIVIDE function returns the division of two specified parameters (x/y).

DIVIDE(<NumericParameter_1>,<NumericParameter_2>)

Aggregate = No

Example:

 

Example

FieldA

FieldB

4

2

 

DIVIDE([FieldA],[FieldB]) = 2

This formula is dividing FieldA by FieldB.

EXP

The EXP function calculates the exponential function raised to a specified power (ex).

EXP(<NumericParameter_1>)

Aggregate = No

 

Example

FieldA

4

 

EXP([FieldA]) = 54.5981500331

This formula is calculating the mathematical constant, e, raised to the power of FieldA.

 

LOG

The LOG function calculates the logarithm of a specified parameter in a specified base (i.e., NumericParameter_2).

LOG(<NumericParameter_1>,<NumericParameter_2>)

Aggregate = No

 

Example

FieldA

100

 

LOG([FieldA],10) = 2

This formula is calculating the logarithm of base 10 of FieldA.

MAX

The MAX function returns the maximum value found for all specified parameters in all rows.

MAX(<NumericParameter_1>,<NumericParameter_2>…<NumericParameter_N>)

Aggregate = Yes

 

Example – Collect Form1

FieldA

FieldB

FieldC

12

0.9

108

37

44

67

0.7

131

23

 

MAX([form1.FieldA],[form1.FieldB],[form1.FieldC]) = 131

This formula is calculating the maximum value of all rows from FieldA, FieldB, and FieldC on Form1.

MAXVAL

The MAXVAL function gets the largest parameter out of a list of parameters. This function can be used with any parameter type and ignores null values.

MAXVAL(<NumericParameter_1>,<NumericParameter_2>…<NumericParameter_N>)

Aggregate = No

 

Example

FieldA

FieldB

FieldC

FieldD

FieldE

8

14

60

 

38

 

MAXVAL([FieldA],[FieldB],[FieldC],[FieldD],[FieldE]) = 60

This formula is calculating the maximum value from FieldA, FieldB, FieldC, FieldD, and FieldE.

MIN

The MIN function returns the minimum value found for all specified parameters in all rows.

MIN(<NumericParameter_1>,<NumericParameter_2>…<NumericParameter_N>)

Aggregate = Yes

 

Example – Collect Form1

FieldA

FieldB

FieldC

12

0.9

108

37

44

67

0.7

131

23

 

MIN([form1.FieldA],[form1.FieldB],[form1.FieldC]) = 0.7

This formula is calculating the minimum value of all rows from FieldA, FieldB, and FieldC.

MINVAL

The MINVAL function gets the smallest parameter out of a list of parameters. This function can be used with any parameter type and ignores null values.

MINVAL(<NumericParameter_1>,<NumericParameter_2>…<NumericParameter_N>)

Aggregate = No

 

Example

FieldA

FieldB

FieldC

FieldD

FieldE

8

14

60

 

38

 

MINVAL([FieldA],[FieldB],[FieldC],[FieldD],[FieldE]) = 8

This formula is calculating the minimum value from FieldA, FieldB, FieldC, FieldD, and FieldE.

MULTIPLY

The MULTIPLY function calculates the product of the specified parameters.

MULTIPLY(<NumericParameter_1>,<NumericParameter_2>…<NumericParameter_N>)

Aggregate = No

 

Example

FieldA

FieldB

FieldC

2

5

3

 

MULTIPLY([FieldA],[FieldB],[FieldC]) = 30

This formula is calculating the product of FieldA, FieldB, and FieldC.

POWER

The POWER function calculates the value of a specified parameter raised to a specified power (i.e., NumericParameter_2).

POWER(<NumericParameter_1>,<NumericParameter_2>)

Aggregate = No

 

Example

FieldA

4

 

POWER([FieldA],2) = 16

This formula is calculating FieldA raised to the power 2, as specified by the second parameter.

 

PRODUCT

The PRODUCT function calculates the product of all the specified parameters in all rows.

PRODUCT(<NumericParameter_1>,<NumericParameter_2>…<NumericParameter_N>)

Aggregate = Yes

 

Example – Collect Form1

FieldA

FieldB

3

1

2

4

6

2

 

PRODUCT([form1.FieldA],[form1.FieldB]) = 288

This formula is calculating the product of all rows from FieldA and FieldB on Form1.

ROUND

The ROUND function rounds a specified parameter to a specified number of fractional digits (i.e., NumericParameter_2).

ROUND(<NumericParameter_1>,<NumericParameter_2>)

Aggregate = No

 

Example 1

FieldA

10.3508

 

ROUND([FieldA],1) = 10.4

This formula is rounding the FieldA value to 1 fractional digit, as specified by the second parameter.

 

Example 2

FieldA

10.3508

 

ROUND([FieldA],3) = 10.351

This formula is rounding the FieldA value to 3 fractional digits, as specified by the second parameter.

SIN

The SIN function calculates the sine of the specified angle.

SIN(<NumericParameter_1>)

Aggregate = No

 

Example

FieldA

15

 

SIN([FieldA]) = 0.25881904510252

This formula is calculating the sine of FieldA.

SINH

The SINH function calculates the hyperbolic sine of the specified angle. The angle must be in radians.

SINH(<NumericParameter_1>)

Aggregate = No

 

Example

FieldA

0.1

 

SINH([FieldA]) = 0.10016675001984403

This formula is calculating the hyperbolic sine of FieldA.

SQRT

The SQRT function calculates the square root of a specified parameter.

SQRT(<NumericParameter_1>)

Aggregate = No

 

Example

FieldA

4

 

SQRT([FieldA]) = 2

This formula is calculating the square root of FieldA.

SUBTRACT

The SUBTRACT function returns the value of the first parameter minus the total value of the remaining parameters.

SUBTRACT(<NumericParameter_1>,<NumericParameter_2>…<NumericParameter_N>)

Aggregate = No

 

Example

FieldA

FieldB

FieldC

6

1

3

 

SUBTRACT([FieldA],[FieldB],[FieldC]) = 2

This formula is subtracting FieldB and FieldC from FieldA.

SUM

The SUM() function calculates the sum of all the specified parameters in all rows.

SUM(<NumericParameter_1>,<NumericParameter_2>…<NumericParameter_N>)

Aggregate = Yes

 

Example – Collect Form1

FieldA

FieldB

3

1

2

4

6

2

 

SUM([form1.FieldA],[form1.FieldB]) = 18

This formula is adding all rows of FieldA and FieldB on Form1 together.

TAN

The TAN function calculates the tangent of the specified angle.

TAN(<NumericParameter_1>)

Aggregate = No

 

Example

FieldA

15

 

TAN([FieldA]) = 0.2679491924311227

This formula is calculating the tangent of FieldA.

TANH

The TANH function calculates the hyperbolic tangent of the specified angle. The angle must be in radians.

TANH(<NumericParameter_1>)

Aggregate = No

 

Example

FieldA

0.1

 

TANH([FieldA]) = 0.09966799462495582

This formula is calculating the hyperbolic tangent of FieldA.