IFBLANK function
Value
The value to return if it is not blank.
ValueIfBlank
The value to return if the value parameter is blank.
Returns
The first parameter if it is not a "not available" error and the second parameter otherwise.
Returns a value unchanged if it is not blank and a different value otherwise. IFBLANK(Field1, 4)IFBLANK(Field1; 4) returns the value of Field1 if it is not blank, and 4 otherwise.
The formula above is equivalent to this formula, but IFBLANK does not require the value to be repeated:
This function is specific to Calcapp.
IFBLANK and arrays
Invoking IFBLANK with an array as its first parameter applies it to the array as a whole, not to its constituent elements.
This formula returns the array { Field1 }{ Field1 } if the IncludedFields property returns a blank value:
Use MAP to invoke IFBLANK once for every array element instead. This formula returns the array { 1, 2, -1, 4 }{ 1; 2; -1; 4 }:
Above, IFBLANK is invoked once for each array element. When it encounters the third array element, which is blank, it returns -1 instead of the array element. MAP incorporates all return values from IFBLANK into the result array.
Examples
Returns the value of Field1 if it is not blank, and 4 otherwise.
Returns the array { Field1 }{ Field1 } if the IncludedFields property returns a blank value.
Returns the array { 1, 2, -1, 4 }{ 1; 2; -1; 4 }. IFBLANK is invoked once for each array element and returns all array elements unchanged, except for the third array element. That element is blank, and causes IFBLANK to return -1. MAP incorporates all return values from IFBLANK into the result array.