function, since version 1.0.0
categories: conditionals

coalesce(a, b, c,…)

This is variadic function - you can pass as many parameters as you want. All parameters have the same type. Function returns the first non-empty parameter


Following expression will return product description. If description is empty, then it returns long description. If long description is empty as well, it returns constant string no description

coalesce(product.description, product.longDescription, 'no description')

Related functions:

Update your privacy settings