Dynamic Logic Expressions

Edited

Dynamic logic expressions let you define how custom properties behave — for example, setting default values, applying conditions, or calculating results automatically based on other fields.

Supported Syntax

Expressions use a simple, Excel-style syntax.

Element

Description

Example

Literals

Numbers, strings, booleans, NULL

123, "High", TRUE, NULL

Field references

Reference any field using square brackets

[Priority], [Cost.Center]

Operators

Arithmetic and comparison

+, -, *, /, %, <, <=, >, >=, =, <>, AND, OR, NOT

Functions

Built-in logic helpers

IF, CASE, COALESCE, CONTAINS, STARTSWITH, ENDSWITH

Whitespace is ignored and field names are not case-sensitive.


Common Functions

IF

Returns one of two values depending on a condition.
Syntax:

IF(condition, trueValue, falseValue)

Example:

IF([Score] > 80, "High", "Normal")

CASE

Simplifies multiple conditional branches (use instead of nested IFs).
Syntax:

CASE(cond1, value1, cond2, value2, ..., defaultValue)

Example:

CASE(
 [Score] >= 90, "A",
 [Score] >= 75, "B",
 [Score] >= 60, "C",
 "D"
)

COALESCE

Returns the first non-NULL value from the list provided.

Syntax:

COALESCE(value1, value2, value3, ...)


Example:

COALESCE([OverrideLabel], [DefaultLabel], "(none)")

CONTAINS

Determines whether a given search term (term) appears in a target string (value). Returns a boolean (TRUE / FALSE).

Syntax:

CONTAINS(value, term, {case insensitive}, {whole word match})

value (required): The text to search.

term (required): The search term to look for.

case insensitive (optional, default TRUE): If TRUE, comparison is case-insensitive. If FALSE, comparison is case-sensitive.

whole word match (optional, default FALSE): If TRUE, only whole word matches are considered. if term = 'here', then value 'are you here' will match, but term 'are you there' will NOT


Example:

CONTAINS([Value], "risk")         -- TRUE if 'risk' appears (case-insensitive by default)

CONTAINS([Value], "Risk", FALSE)  -- Case-sensitive; TRUE only if exact 'Risk' occurs

CONTAINS([Value], "risk", TRUE, TRUE)    -- Whole word search (e.g. 'risk' not 'risky')

CONTAINS("The quick brown fox", "quick", TRUE)  -- returns TRUE

CONTAINS("Thequickbrownfox", "quick", TRUE, TRUE) -- returns FALSE (not a whole word)

CONTAINS([Title], "", TRUE)                       -- returns FALSE (empty needle)

CONTAINS(NULL, "any")                             -- returns FALSE

STARTSWITH

Determines whether a target string (value) begins with a specified search term (term). Returns a boolean (TRUE / FALSE), TRUE only if the match occurs at the very start (position 0).

Syntax:

STARTSWITH(value, term, {case insensitive}, {whole word match})

value (required): The text to search.

term (required): The search term to look for.

case insensitive (optional, default TRUE): If TRUE, comparison is case-insensitive. If FALSE, comparison is case-sensitive.

whole word match (optional, default FALSE): If TRUE, only whole word matches are considered. if term = 'are', then value 'are you here' will match, but term 'aren't you here' will NOT


Example:

STARTSWITH([Value], "proj") -- TRUE if Title starts with "proj" (case-insensitive)

STARTSWITH([Value], "Proj", FALSE)   -- Case-sensitive; TRUE only if exact "Proj" case

STARTSWITH("Project Alpha", "Project", TRUE, TRUE)   -- TRUE (word boundary)

STARTSWITH("ProjectAlpha", "Project", TRUE, TRUE)    -- FALSE (no word boundary)

STARTSWITH("Header", "Head", TRUE, TRUE)             -- FALSE ('e' - not a word boundary)

STARTSWITH([Code], "")                               -- FALSE (empty needle)

STARTSWITH(NULL, "Any")                              -- FALSE

ENDSWITH

Determines whether a target string (value) ends with a specified search term (term). Returns a boolean (TRUE / FALSE), TRUE only if the match occurs at the very end.

Syntax:

ENDSWITH(value, term, {case insensitive}, {whole word match})

value (required): The text to search.

term (required): The search term to look for.

case insensitive (optional, default TRUE): If TRUE, comparison is case-insensitive. If FALSE, comparison is case-sensitive.

whole word match (optional, default FALSE): If TRUE, only whole word matches are considered. if term = 'here', then value 'are you here' will match, but term 'are you there' will NOT


Example:

ENDSWITH([Value], "status")        -- TRUE if Title ends with "status" (case-insensitive)

ENDSWITH([Value], "Status", FALSE)   -- Case-sensitive; TRUE only if exact "Status"

ENDSWITH("Task done", "done", TRUE, TRUE)       -- TRUE (word boundary)

ENDSWITH("Taskdone", "done", TRUE, TRUE)        -- FALSE (no word boundary)

ENDSWITH("pretestpost", "test", FALSE, TRUE)    -- FALSE (no word boundary)

ENDSWITH([Note], "", TRUE)                      -- FALSE (empty needle)

ENDSWITH(NULL, "anything")                      -- FALSE


Other Rules

  • [FieldName] must be enclosed in square brackets.

  • String comparisons are not case-sensitive.

  • + joins strings or adds numbers.

  • NULL represents a missing value.

  • FALSE values: FALSE, 0, "", NULL.

  • Non-zero numbers and non-empty strings evaluate as TRUE.


Example Expressions

Use Case

Expression

Rank logic

CASE(

[Severity] = "Critical" AND [Status] <> "Closed", "P1",

[Severity] = "High", "P2",

[Severity] = "Medium", "P3",

"P4")

Automatic flag

IF([Budget] > 0 AND ([Phase] = "Build" OR [Phase] = "Test"), TRUE, FALSE)

Fallback label

COALESCE([ShortName], [DisplayName], "Unnamed")

Concatenate text

"RAG=" + [RAG] + ", Score=" + [Score]


Validation Checklist

  1. Parentheses are balanced.

  2. IF has exactly three arguments.

  3. CASE has an odd number of arguments (last one is default).

  4. Field names are wrapped in [ ].

  5. Strings use quotes ("text" or 'text').


Common Errors

Error Message

Likely Cause

Expression cannot be empty

No content in the expression field

CASE requires at least three arguments

Missing default value

Expected identifier

Misspelt function or missing comma

Division by zero

Numeric denominator is 0

Maximum expression depth exceeded

Too many nested IFs (use CASE instead)


Tips

  • Use uppercase for functions (IF, CASE, COALESCE).

  • Indent multi-line expressions for readability.

  • Order comparisons from highest to lowest thresholds.

  • Prefer CASE for complex multi-condition logic.

Was this article helpful?

Sorry about that! Care to tell us more?

Thanks for the feedback!

There was an issue submitting your feedback
Please check your connection and try again.