BLANK function
Returns
A blank value.
Returns a blank value.
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.
Use ISBLANK and ISDEFINED to check if a value is blank and if a value is defined, respectively.
This formula returns FALSE:
This formula returns TRUE:
IFBLANK is a convenient way of returning a different value if a value is blank, or the value itself otherwise:
The preceding formula returns the value of Field1 (Field1.ValueField1,Value) if it isn't blank, and 0 otherwise.
While Calcapp does not allow parameters to functions to be omitted entirely, BLANK()BLANK() can be used for all parameter values. Most functions have required parameters, though, and functions will likely return an error when your app is run if a required parameter is blank.
This function is specific to Calcapp.
Assigning a blank value
Action formulas, which are run when events are triggered (including when a button is pressed), can assign values to fields using the assignment operator :=.
These equivalent formulas both assign 0 to the value of Field1:
These formulas instead assign a blank value to the value of Field1:
Examples
Returns a blank value.
Returns the array { 2, 4, 6, 8 }{ 2; 4; 6; 8 } only if Field1 has a value that is greater than 20. Otherwise, the array { 2, 4, 8 }{ 2; 4; 8 } is returned. In other words, IF inside of an array can be used to determine if an array element should be part of the array by leaving out the third parameter to IF.
Returns the array { 2, 4, 6, 8 }{ 2; 4; 6; 8 } only if Field1 has a value that is greater than 20. Otherwise, the array { 2, 4, BLANK(), 8 }{ 2; 4; BLANK(); 8 } is returned. This example illustrates that leaving out the third parameter to IF results in the element being omitted entirely from the array, whereas using BLANK()BLANK() as the third parameter instead includes a blank value.