--- title: "coalesce" description: "This function, which accepts any number of arguments, evaluates each in order, and returns the first non-null argument." --- # coalesce > This function, which accepts any number of arguments, evaluates each in order, and returns the first non-null argument. **This function is used by Ignition's Expression language.** ## Description This function, which accepts any number of arguments, evaluates each in order, and returns the first non-null argument. A typical use case involves two arguments - the first being something dynamic, the second being a static value to use as a guard in case the dynamic value is null. The function itself detects its return type based on the type of the last argument. ## Syntax `coalesce(value, [value, ...])` ### Parameters | Type | Parameter | Description | |--------|-----------|--------------------------------------------| | Object | `value` | Any number of values to evaluate in order. | ### Returns **Object** - The first non-null argument. If all arguments are null, the result is null. ## Examples ```python title="Code Snippet" coalesce(null, "abc") //would return "abc" ``` ```python title="Code Snippet" coalesce("xyz", "abc") //would return "xyz" ``` ```python title="Code Snippet" coalesce({Root Container.MyDataSet}["ColumnName"], 0) //would return the value in the dataset if it isn't null, but 0 if it is null. ```