Boolean functions




uIsAscending

Description

Returns 1 if every parameter is equal to or greater than its predecessor.

Syntax

number uIsAscending(params, ...)

Parameters

param

A list of expressions or values of any datatype.

Examples

Example 1

To check multiple values for an ascending order:

uIsAscending("A", "B", "C")  // returns 1
uIsAscending("A", "A", "C")  // returns 1
uIsAscending("A", "C", "B")  // returns 0
uIsAscending("1", "2", "3")  // returns 1
uIsAscending("3", "2", "2")  // returns 0
uIsAscending("2004-03-03", "2004-03-05", "2004-03-07")  // returns 1
uIsAscending("2004-03-03", "2004-03-07", "2004-03-05")  // returns 0



ulsBoolean

Description

Returns true if the parameter is either “1,” “true,” or “yes.”

Syntax

number uIsBoolean(params, ...)

Parameters

params

A list of expressions or values of any datatype.

Examples

Example 1

To check for a Boolean value:

uIsBoolean("1")    // returns 1
uIsBoolean("yes")  // returns 1
uIsBoolean("true") // returns 1



ulsDate

Description

Returns 1 if the parameter can be interpreted as a date. If the second parameter is empty, the function attempts to apply one of the following formats:

NoteFor details about the format string, refer to the uConvertDate function.

Syntax

number uIsDate(datestring [, format])

Parameters

string datestring

The string to be checked.

string format(optional)

The format of the input date.

NoteOmitting the format parameter can slow down the function execution time.

Examples

Example 1

To check for a valid date value:

uIsDate(“2004-02-29”) // returns 1
uIsDate(“2003-02-29”) // returns 0, because 2003 was not a leap year




ulsDescending

Description

Returns 1 if every parameter is equal to or lower than its predecessor.

Syntax

number uIsDescending(params, ...)

Parameters

params

A list of expressions or values of any datatype.

Examples

Example 1

To check multiple values for a decending order:

uIsDescending("C", "B", "A")  // returns 1
uIsDescending("C", "C", "A")  // returns 1
uIsDescending("A", "C", "B")  // returns 0
uIsDescending("3", "2", "1")  // returns 1
uIsDescending("3", "2", "3")  // returns 0
uIsDescending("2004-03-20", "2004-03-15", "2004-03-07")  // returns 1
uIsDescending("2004-03-20", "2004-03-07", "2004-03-15")  // returns 0



ulsInteger

Description

Returns 1 if the parameter can be interpreted as an integer value.

Syntax

number uIsInteger(param)

Parameters

param

An expression or value to investigate.

Examples

Example 1

uIsInteger (“1”)   // returns 1
uIsInteger (“2.34”)  // returns 0
uIsInteger (“ABC”)  // returns 0




ulsFloat

Description

Returns 1 if the parameter can be interpreted as a floating point value.

Syntax

number ulsFloat (params)

Parameters

params

An expression or value to investigate.

Examples

Example 1

uIsFloat(“1”)		 //returns 1
uIsFloat (“2.34”) //returns 1
uIsFloat (“ABC”) //returns 0



ulsNull

Description

Returns 1 if the parameter is null.

Syntax

number uIsNull (params)

Parameters

params

An expression or value to investigate.

Examples

Example 1

To check for a null value:

uIsNull(“1”)   // returns 0
uIsNull(null)  // returns 1



ulsNumber

Description

Returns 1 if the parameter can be interpreted as a number.

Syntax

number uIsNumber (params)

Parameters

params

An expression or value to investigate.

Examples

Example 1

To check for a numeric value:

uIsNumber("1")    // returns 1
uIsNumber("2.34") // returns 1
uIsNumber("ABC")  // returns 0



uNot

Description

Calculates the logical not from the input expression. This function is only used in conjunction with the uIs-Functions, because the Boolean values returned are not true and false, but are 0 and 1.

Syntax

number uNot(expression)

Parameters

expression

A numeric value that should be negated.

Examples

Example 1

uNot(1) // returns 0