Skip to main content
FIRST_NOT_EMPTY

Returns the first non-empty value from a list of options.

Updated over a week ago

Description

FIRST_NOT_EMPTY() traverses its arguments and returns the first non-empty value encountered. Useful when dealing with empty strings or nulls and needing the first non-empty or non-null value.

Syntax

FIRST_NOT_EMPTY(option1, option2, ...)

Output

text

Variables

  1. option1, option2, ...: Multiple options to evaluate and return the first non-empty value.

Example

FIRST_NOT_EMPTY(`Option 1`, `Option 2`)

Option 1

Option 2

FIRST_NOT_EMPTY

"Hello"

NULL

"Hello"

""

"World"

"World"

NULL

NULL

NULL

Did this answer your question?