ISDEFINED function

ISDEFINED(Value) ISDEFINED(Value)

Value

? or { ? }

The value to test.

Returns

Logical or { Logical }

Whether the given parameter is defined.

Returns whether the given value is defined. ISDEFINED(BLANK())ISDEFINED(BLANK()) returns FALSE.

Fields without an assigned value are said to be blank, and fields with an assigned value are said to be defined. A field without an initial value is considered to be blank before a user types a value into it.

This function is specific to Calcapp.

Related functions

IFBLANK is a convenient way of returning a different value if a value is blank, or the value itself otherwise. This formula returns the value of Field1 (Field1.ValueField1,Value) if it isn't blank, and 0 otherwise:

IFBLANK(Field1, 0)IFBLANK(Field1; 0)

To check if a value is blank, use the ISBLANK function. Use the the BLANK function to create a blank value.

ISDEFINED and arrays

Applying ISDEFINED to an array yields a logical array with the same size as the original array, where TRUE elements indicate that the corresponding element in the original array is defined and FALSE elements indicate the opposite.

This formula returns { FALSE, TRUE }{ FALSE; TRUE }, indicating that the first element is blank and the second element is defined:

ISDEFINED({ BLANK(), 42 })ISDEFINED({ BLANK(); 42 })

Use AND to determine if all array elements are defined. This formula returns FALSE, as not all elements are defined:

AND(ISDEFINED({ BLANK(), 42 }))AND(ISDEFINED({ BLANK(); 42 }))

Use OR to determine if one or more array elements are defined. This formula returns TRUE, as the second array element is defined:

OR(ISDEFINED({ BLANK(), 42 }))OR(ISDEFINED({ BLANK(); 42 }))

To check if an array value itself, and not its constituent elements, is defined, use the != operator and the BLANK function:

EmailReportButton1.IncludedFields != BLANK()EmailReportButton1,IncludedFields != BLANK()

Examples

ISDEFINED(BLANK())ISDEFINED(BLANK())

Returns FALSE.

Returns TRUE. Values which are not defined are blank, by definition.

IFBLANK(Field1, 0)IFBLANK(Field1; 0)

Returns the value of Field1 (Field1.ValueField1,Value) if it isn't blank, and 0 otherwise.

ISDEFINED({ 4, "test", BLANK() })ISDEFINED({ 4; "test"; BLANK() })

Returns the array { TRUE, TRUE, FALSE }{ TRUE; TRUE; FALSE }, indicating that only the last element of the array is not defined.

{ 4, "test", BLANK() } == BLANK(){ 4; "test"; BLANK() } == BLANK()

Returns FALSE, as the array { 4, "test", BLANK() }{ 4; "test"; BLANK() }, in and of itself, is not blank.

!ISEMPTY(FILTER({ 4, "test", BLANK() }, ISDEFINED(Element)))!ISEMPTY(FILTER({ 4; "test"; BLANK() }; ISDEFINED(Element)))

Returns TRUE, as the array { 4, "test", BLANK() }{ 4; "test"; BLANK() } contains at least one defined element. FILTER returns an array containing the defined values, { 4, "test" }{ 4; "test" }. ISEMPTY, when applied to this array, returns FALSE to indicate that the array is not empty. The ! operator finally negates that return value, turning TRUE to FALSE and FALSE to TRUE.

OR({ 4, "test", BLANK() } <> BLANK())OR({ 4; "test"; BLANK() } <> BLANK())

Returns TRUE, as the array { 4, "test", BLANK() }{ 4; "test"; BLANK() } contains at least one defined element. The <> operator returns the array { TRUE, TRUE, FALSE }{ TRUE; TRUE; FALSE }, indicating that the first two elements are defined, unlike the third element. OR finally returns TRUE, as there is at least one element in the array equal to TRUE.