On This Page

Conditional Functions

Functions for conditional evaluation, comparisons, and logical operations.

Common Patterns

  • Simple Categorization:

    if(Amount > 1000, "High", "Low")
  • Multi-Level Categorization: Nest if functions for multiple categories:

    if(Amount >= 10000, "Enterprise",
       if(Amount >= 1000, "Business",
          if(Amount >= 100, "SMB", "Consumer")
       )
    )
  • Using the Bucket Function: For numeric thresholds, bucket is often cleaner:

    // Auto-generated labels
    bucket(Amount, 100, 1000, 10000)
    // Result: "<100", "100–1K", "1K–10K", or "≥10K"
    
    // Custom labels
    bucket(Amount, 100, "Small", 1000, "Medium", 10000, "Large", "Enterprise")
  • Time-Based Conditions:

    if(dayOfWeek(StartTime) in [6, 7], "Weekend", "Weekday")

if

(condition, thenValue, elseValue)

Returns one value if a condition is true and another if it is false.

Parameters
condition boolean Condition to evaluate
thenValue any Value to return if the condition is true
elseValue any Value to return if the condition is false
Returns any
Examples
if(Amount > 1000, "High", "Low") → High or Low
if(Status == "Approved", 1, 0) → 1 or 0
if(5 > 3, "yes", "no") → yes
if(2 > 7, "a", "b") → b
Notes

Can be nested for multiple conditions.

min

(value1, value2, ...?)

Returns the smallest value in a list of numbers.

Parameters
value1 number First value
value2 number Second value
... (optional) number Additional values, up to 6 total
Returns number
Examples
min(5, 3, 8, 1) → 1
min(Amount, Budget) → smaller of the two
See Also
max

max

(value1, value2, ...?)

Returns the largest value in a list of numbers.

Parameters
value1 number First value
value2 number Second value
... (optional) number Additional values, up to 6 total
Returns number
Examples
max(5, 3, 8, 1) → 8
max(Amount, MinimumAmount) → larger of the two
See Also
min

bucket

(value, thresholds...)

Groups a value into buckets based on thresholds. Labels can be generated automatically or set manually.

Parameters
value number Value to categorize
thresholds... number | string Threshold values, optionally followed by labels
Returns string
Examples
bucket(Amount, 100, 1000, 10000) → <100, 100–1K, 1K–10K, or ≥10K

Automatically generated labels

bucket(hour(StartTime), 6, "Night", 12, "Morning", 18, "Afternoon", "Evening") → Night, Morning, Afternoon, or Evening

Custom labels

bucket(500, 100, 1000, 10000) → 100–1K
bucket(14, 6, "Night", 12, "Morning", 18, "Afternoon", "Evening") → Afternoon
Notes

In auto mode, all arguments after the value must be numbers. In manual mode, provide threshold/label pairs followed by a default label.

Design better processes. Build a connected architecture. Stay in control.

Get instant access with no credit card and no waiting. Turn the way your organization works into clear, connected process designs.

Build your process architecture, define ownership and controls, and align roles and responsibilities across every level.

Start your free trial and create one reliable foundation for governing, managing, and continuously improving your processes.