IF - if conditions

IF: if conditions (if/then/else support with multiple boolean operators)

Syntax

if(condition, then, [else])

Arguments

  • condition: A condition can use any comparison like = (equals), > (greater), >= (greater or equal), < (less), <= (less or equal) combined with boolean operators & (AND) or | (OR) and parenthesis
  • then: Text or function to use if condition is true (so if return value is not empty and not 0)
  • else: Optional text or function to be called if condition is false (so either empty or 0)

Examples

FormulaDescription
$if(df(f)>5, "Week End!", "Workday :(")$Will show Week End! during week ends or Workday :( during workdays
Battery $if(bi(level) = 100, "is fully charged", bi(level) <= 15, "is critically low", "is at " + bi(level) + "%" )$Shows status of battery writing fully charged when full, critical if below 15 or the normal level otherwise
$if(df(MMMM) ~= "a", "Has an A", NO)$Will show Has an A if this month name contains an a (regexp allowed), NO otherwise
$if(wi(code) != CLEAR, "Not Sunny")$Will show not sunny if sky is not clear, nothing otherwise



Privacy Policy