The sign()
function returns the sign of its argument. It indicates whether its argument is positive, negative, or zero.
sign(number)
sign()
accepts only numbers; it will not auto-convert Booleans or other data types.
Example Formulas
sign(-5) // -1
sign(5) // 1
sign(0) // 0
sign(+"-1") // -1
Example Database
The example database below lists bank account balances. The sign()
function is used to determine the output of the Status property.

View and Duplicate Database

“Balance” Property Formula
// Compressed
sign(prop("Balance")) == -1 ? "🔴 Negative Balance!" : sign(prop("Balance")) == 0 ? "🟡 $0 Balance" : "🟢 Balance OK"
// Expanded
sign(
prop("Balance")
) == -1 ?
"🔴 Negative Balance!" :
sign(
prop("Balance")
) == 0 ?
"🟡 $0 Balance" :
"🟢 Balance OK"
This simple formula uses a nested if-statement (written in the ternary operator syntax with ?
and :
) to return one of three status messages.
The output is determined by the sign()
function’s output.
Good to know: You can also use comparison operators such as larger and smaller to accomplish the same thing.
E.g. prop("Balance") < 0
.
Other formula components used in this example:

