Boolean

Function

Description

uIsAscending

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

uIsBoolean

Returns 1 if the parameter is one of 1, true, or yes

uIsDate

Returns 1 if the parameter can be interpreted as a date

uIsDescending

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

uIsEmpty

Returns 1 if the parameter is empty or null

uIsInteger

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

uIsFloat

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

uIsNull

Returns 1 if the parameter is null

uIsNumber

Returns 1 if the parameter can be interpreted as a number




uIsAscending

Description

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

Syntax

number uIsAscending(params, ...)

Parameters

params

A list of expressions or values of any datatype.

Examples

Example 1

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



uIsBoolean

Description

Returns 1 if the parameter is:

Syntax

number uIsBoolean(param)

Parameters

param

An expressions or value of any data type.

Examples

Example 1

Check for Boolean value:

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



uIsDate

Description

Returns 1 if the parameter can be interpreted as a date. If the second parameter is omitted, the function tries to apply one these formats:

NoteFor details about the format string, see 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

Examples

Example 1

uIsDate("2004-02-29") // returns 1
uIsDate("2003-02-29") // returns 0, since 2003 was not a leap year



uIsDescending

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 data type

Examples

Example 1

Check multiple values for a descending 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



uIsEmpty

Description

Returns 1 if the parameter is empty or null

Syntax

number uIsEmpty(param)

Parameters

param

An expression or value to investigate

Examples

Example 1

uIsEmpty("1")           // returns 0
uIsEmpty(null)          // returns 1
uIsEmpty("")            // returns 1



uIsInteger

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



uIsFloat

Description

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

Syntax

number uIsFloat(param)

Parameters

param

An expression or value to investigate

Examples

Example 1

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




uIsNull

Description

Returns 1 if the parameter is null

Syntax

number uIsNull(param)

Parameters

param

An expression or value to investigate

Examples

Example 1

uIsNull("1")  // returns 0
uIsNull(null) // returns 1



uIsNumber

Description

Returns 1 if the parameter can be interpreted as a number

Syntax

number uIsNumber(param)

Parameters

param

An expression or value to investigate

Examples

Example 1

Check for a numeric value:

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