Boolean Functions

<< Click to Display Table of Contents >>

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

Boolean Functions

The Boolean functions are used to evaluate and return one of two possible values—True or False. Within EQuIS Collect, the functions can be used to evaluate data as they are entered in forms on the Mobile app. The Boolean functions can also be used to show or hide specified fields 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 Boolean function and its operations. The examples are applicable to either fields in a Collect form or an EQuIS Link data source, unless otherwise noted.

ALLIN

The ALLIN function returns TRUE if all the comma delimited values in the first parameter are found in the combined lists of comma delimited values of the subsequent parameters.

ALLIN(<Parameter_1>,<Parameter_2…<Parameter_N>)

Aggregate = No

 

Example 1

FieldA

FieldB

FieldC

FieldD

FieldE

EarthSoft

1996

Location

EarthSoft

Sample02

 

ALLIN([FieldA],[FieldB],[FieldC],[FieldD],[FieldE]) = TRUE

 

Example 2

FieldA

FieldB

FieldC

FieldD

FieldE

EarthSoft

1996

Location

EarthSoft-2018

Sample02

 

ALLIN([FieldA],[FieldB],[FieldC],[FieldD],[FieldE]) = FALSE

AND

Function AND returns TRUE if all parameters are met.

AND(<Parameter_1>,<Parameter_2>…<Parameter_N>)

Aggregate = No

 

Example 1

FieldA

FieldB

FieldC

FieldD

6

0.51

0.62

0.87

 

AND(EQ([FieldA],6),LT([FieldB],[FieldC])) = TRUE

 

Example 2

FieldA

FieldB

FieldC

FieldD

6

0.51

0.62

0.87

 

AND(EQ([FieldA],6),LT([FieldD],[FieldC])) = FALSE

 

Example 3

FieldA

FieldB

FieldC

FieldD

6

0.51

0.62

0.87

 

AND(EQ([FieldA],[FieldD])) = FALSE

BETWEEN

The BETWEEN function returns TRUE if the third parameter is between the first two parameters.

BETWEEN(<Parameter_1>,<Parameter_v2>,{<Parameter_3>})

Aggregate = No

 

Example 1

FieldA

FieldB

FieldC

FieldD

9.76

3.20

4.17

1.09

 

BETWEEN([FieldB],[FieldA],[FieldC]) = TRUE

 

Example 2

FieldA

FieldB

FieldC

FieldD

9.76

3.20

4.17

1.09

 

BETWEEN([FieldB],[FieldA],[FieldD]) = FALSE

 

Example 3

FieldA

FieldB

FieldC

FieldD

2018/02/20 11:31:45

2018/02/22 10:43:28

2018/02/21 14:37:08

2018/02/23 09:37:08

 

BETWEEN([FieldA],[FieldB],[FieldC]) = TRUE

 

Example 4

FieldA

FieldB

FieldC

FieldD

2018/02/20 11:31:45

2018/02/22 10:43:28

2018/02/21 14:37:08

2018/02/23 09:37:08

 

BETWEEN([FieldA],[FieldB],[FieldD]) = FALSE

EQ

The EQ function returns TRUE if all parameters are equal.

EQ(<Parameter_1>,<Parameter_2>…<Parameter_N>)

Aggregate = No

 

Example 1

FieldA

FieldB

FieldC

5

5

8

 

EQ([FieldA],[FieldB]) = TRUE

 

Example 2

FieldA

FieldB

FieldC

5

5

8

 

EQ([FieldA],[FieldB],[FieldC]) = FALSE

FALSE

The FALSE function always returns FALSE. The function can be used to hide a specified parameter on Collect forms.

FALSE(<Parameter_1>,<Parameter_2>…<Parameter_N>)

Aggregate = No

 

Example 1

FieldA

FieldB

FieldC

5

1

8

 

FALSE([FieldA],[FieldB],[FieldC]) = FALSE

GE

The GE function returns TRUE if the first parameter is greater than or equal to the second parameter.

GE(<Parameter_1>,<Parameter_2>)

Aggregate = No

 

Example 1

FieldA

FieldB

FieldC

FieldD

FieldE

5.23

7.84

7.84

6.65

5.23

 

GE([FieldA],[FieldE]) = TRUE

 

Example 2

FieldA

FieldB

FieldC

FieldD

FieldE

5.23

7.84

7.84

6.65

5.23

 

GE([FieldC],[FieldD]) = TRUE

 

Example 3

FieldA

FieldB

FieldC

FieldD

FieldE

5.23

7.84

7.84

6.65

5.23

 

GE([FieldE],[FieldB]) = FALSE

GT

The GT function returns TRUE if the first parameter is greater than the second parameter.

GT(<Parameter_1>,<Parameter_2>)

Aggregate = No

 

Example 1

FieldA

FieldB

FieldC

FieldD

FieldE

5.23

7.84

7.84

6.65

2.67

 

GT([FieldB],[FieldA]) = TRUE

 

Example 2

FieldA

FieldB

FieldC

FieldD

FieldE

5.23

7.84

7.84

6.65

2.67

 

GT([FieldB],[FieldC]) = FALSE

 

Example 3

FieldA

FieldB

FieldC

FieldD

FieldE

5.23

7.84

7.84

6.65

2.67

 

GT([FieldE],[FieldD]) = FALSE

IN

Function IN returns TRUE if the first parameter equals the values in any of the following parameters.

IN(<Parameter_1>,{<Parameter_2>…<Parameter_N>})

Aggregate = No

 

Example 1

FieldA

FieldB

FieldC

FieldD

EF

AH

MR

EF

 

IN([FieldA],[FieldB],[FieldC],[FieldD) = TRUE

 

Example 2

FieldA

FieldB

FieldC

FieldD

EF

AH

MR

GW

 

IN([FieldA],[FieldB],[FieldC],[FieldD) = FALSE

ISNULL

The ISNULL function returns TRUE if any of the parameters are NULL.

ISNULL(<Parameter_1>,<Parameter_2>…<Parameter_N>)

Aggregate = No

 

Example 1

FieldA

FieldB

FieldC

FieldD

6

10

 

3

 

ISNULL([FieldA],[fieldB],[FieldC],[FieldD) = TRUE

 

Example 2

FieldA

FieldB

FieldC

FieldD

6

10

 

3

 

ISNULL([FieldA],[FieldB],[FieldD]) = FALSE

LE

The LE function returns TRUE if the first parameter is less than or equal to the second parameter.

LE(<Parameter_1>,<Parameter_2>)

Aggregate = No

 

Example 1

FieldA

FieldB

FieldC

7.8

7.8

5.2

 

LE([FieldC],[FieldB]) = TRUE

 

Example 2

FieldA

FieldB

FieldC

7.8

7.8

5.2

 

LE([FieldA],[FieldB]) = TRUE

 

Example 3

FieldA

FieldB

FieldC

7.8

7.8

5.2

 

LE([FieldA],[FieldC]) = FALSE

LT

The LT function returns TRUE if the first parameter is less than the second parameter.

LT(<Parameter_1>,<Parameter_2>)

Aggregate = No

 

Example 1

FieldA

FieldB

FieldC

7.8

7.8

5.2

 

LT([FieldC],[FieldA]) = TRUE

 

Example 2

FieldA

FieldB

FieldC

7.8

7.8

5.2

 

LT([FieldA],[FieldB]) = FALSE

 

Example 3

FieldA

FieldB

FieldC

7.8

7.8

5.2

 

LT([FieldB],[FieldC]) = FALSE

NOT

The NOT function returns the negation of a specified parameter.

NOT(<Parameter_1>)

Aggregate = No

 

Example 1

FieldA

FieldB

FieldC

1

5

5

 

NOT(EQ([FieldA],[FieldB])) = TRUE

 

Example 2

FieldA

FieldB

FieldC

1

5

5

 

NOT(EQ([FieldB],[FieldC])) = FALSE

OR

The OR function returns TRUE if any of the parameters are met.

OR(<Parameter_1>,<Parameter_2>…<Parameter_N>)

Aggregate = No

 

Example 1

FieldA

FieldB

FieldC

FieldD

6

0.5

0.6

0.8

 

OR(EQ([FieldA],3),LT([FieldB],[FieldD])) = TRUE

 

Example 2

FieldA

FieldB

FieldC

FieldD

6

0.5

0.6

0.8

 

OR(EQ([FieldA],6),LT([FieldC],[FieldB])) = TRUE

 

Example 3

FieldA

FieldB

FieldC

FieldD

6

0.5

0.6

0.8

 

OR(EQ([FieldA],3),LT(FieldD],[FieldC])) = FALSE

TRUE

The TRUE function always returns TRUE. The function can be used to show a specified parameter and is typically used in the Collect templates to make an attribute value TRUE.

TRUE()

Aggregate = No

 

Example 1 – Collect Form1

FieldA

 

 

To make FieldA always be required, the REQUIRED attribute formula would be TRUE().