---
schema_version: "1"
id: 3d302b295732d682de95bca236778f72bb16a8f12796c3ceb142990be74ff0bc
title: Additional Functions for Formulas
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/data/264-0-0/c360_a_batch_transform_additionalfunctions.md
canonical_url: https://help.salesforce.com/s/articleView?id=data.c360_a_batch_transform_additionalfunctions.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 3f204aded453447c5ec71fcaa9f3b0b83f44d224991509708b439d0874135dfc
description: To build logic into formulas, use these functions with the text, number, and datetime data types.
products:
  - Data 360
release: "264"
---
# Additional Functions for Formulas

To build logic into formulas, use these functions with the text, number, and datetime data types.

## `case`

Use a `case` statement to handle if/then logic. A case statement always has a pair of `where` and `then` statements.

### Syntax

```
case [primary_expr]
    when condition
    then result_expression
    else 
        default_expression
end
```

### Parameters

- primary\_expression—Optional. Any valid expression to compare against a set of expressions. The primary expression is compared to the expression in each `when` clause for equivalency. If these expressions are equivalent, the expression in the `then` clause will be returned.
- condition—The `condition` of a `case` statement can take two forms:
    - An expression that is compared against a set of possible values.
    - A boolean expression that evaluates to `true`, `false`, or `null`.
- result\_expression—The expression returned when the primary\_expression satisfies the condition and evaluates to True.
- default\_expression—If neither of the previous comparisons evaluate to True, this expression is returned.

### Examples

```
case ShippingState__c
    when 'CA'
    then 'California'
    else 
        'Other'
end
```

`case      when "ShippingState__c" = 'CA'     then 'California'     else          'Other' end`

## `coalesce`

Use the `coalesce` function as shorthand for case statements. This function replaces null values with another value.

### Syntax

```
coalesce(expression1, expression2)
```

### Parameters

- expression1—The first column or text string to search for a non-null value.
- expression2—The next column or text string to search for a non-null value.

### Example

```
coalesce(city, null) 
```

### Returns

Returns the first non-null value. If there isn’t one, then the function returns null.

## `sequence`

Use the `sequence` function to create a sequence of numbers or dates by defining the start and end values and the interval between each value.

### Syntax

```
sequence(start,stop,step)
```

### Parameters

- start—A field or number.
- stop—A field or number.
- step—A field, number, or date interval.

### Example

```
sequence(start_field, stop_field, interval 1 day)
```

### Returns

Returns an array with one element for each value.

## `UUID`

Use the `uuid` function to generate a unique identifier for rows in a table.

### Syntax

```
uuid()
```

### Parameters

- None

### Returns

Returns a 36-character, universally unique identifier string for each row in a table.