Cheat Sheets/Power Automate/coalesce
Power Automate (WDL) function

coalescePower Automate (WDL) function reference

First non-null value.

Syntax

wdl
coalesce(object1, object2, ...)

Examples

wdl
coalesce(item()?['Nick'], item()?['Name'], 'Guest')
First with a value
wdl
coalesce(item()?['MobilePhone'], item()?['BusinessPhone'], item()?['HomePhone'], 'No phone on file')
The first non-null phone field, or the fallback text
wdl
coalesce(triggerBody()?['UpdatedBy'], triggerBody()?['CreatedBy'])
Whichever field is populated

Also used under "Objects & JSON": first non-null of several fields.

wdl
coalesce(item()?['Mobile'], item()?['Phone'])
First with a value

Common mistakes & gotchas

Related Workflow Definition Language functions

From Logic & comparison

Used in these tutorials

← Back to the Power Automate (WDL) cheat sheet