Use logic functions in Formulas

Use advanced Formulas to make calculations using logic functions.

What you'll need

  • 60 uses of Custom Fields, including Formula Fields, are available on the Free Forever Plan.
  • Unlimited uses are available on all paid plans.
  • Individual Custom Fields can be hidden from guests.
  • Guests with edit or full permissions can edit existing Custom Fields but cannot create new ones.
  • Formula Fields do not support using Custom Fields that contain text.

Variables surrounded by {} in the following sections are optional variables and can be left out of a function without the function breaking. Ensure parentheses are acknowledged in your Formulas or you will receive an error message.

Simple logic functions

Below is a table of the logic gates that ClickUp offers. All inputs and outputs are booleans:
Syntax Example Expected Result
AND(logical_expression1, [logical_expression2, {...}]) AND(true, false, true) false
NOT(logical_expression) NOT(false) true
OR(logical_expression1, [logical_expression2, {...}]) OR(true, false, true) true
XOR(logical_expression1, [logical_expression2, {...}]) XOR(true, false, true) false

Complex logic functions

Below is a table of more complex logic gates that ClickUp offers. 

Syntax Description Example Expected Result
EXACT(string1, string 2) This function takes two strings then returns true if the two strings are identical. Otherwise, the function returns false. EXACT('Word', 'word') false
IF(logical_expression, value_if_true, value_if_false) This function takes an argument and two variables then returns the value_if_true variable if the provided argument is logically true. Otherwise, the function returns the value_if_false variable. IF(true, 'Hello!', 'Goodbye!') Hello!
ISEVEN(value) This function takes a number then returns true if the number is even. Otherwise, the function returns false . ISEVEN(-2.5) true
REGEXMATCH(text, regular_expression) This function takes a string and a regular expression then returns true if a piece of the string matches the regular expression. Otherwise, the function returns false. REGEXMATCH('Palo Alto', 'Alto') true
SWITCH(expression, case1, value1, [default or case2, value2], {...}) This function tests an expression against a list of cases and returns the corresponding value of the first matching case, with an optional default value if nothing else is met.

Example 1: SWITCH(7, 9, 'Nine', 7, 'Seven')

Example 2:

SWITCH(true, 9, 'Nine', 7, 'Seven', 'Not a number')

Example 1: Seven

Example 2:

Not a number


Was this article helpful?