Power Automate (WDL) function
setProperty — Power Automate (WDL) function reference
Set/replace a field.
Syntax
wdl
setProperty(object, property, value)
Examples
wdl
setProperty(item(), 'Status', 'Done')
→ New object
wdl
setProperty(item(), 'Status', if(greater(item()?['DaysOpen'], 30), 'Overdue', 'Open'))
→ The item with Status computed and overwritten
wdl
setProperty(triggerBody(), 'Total', add(triggerBody()?['Subtotal'], triggerBody()?['Tax']))
→ The trigger body with a new/updated Total field
Common mistakes & gotchas
- Unlike addProperty(), setProperty() works whether the property already exists or not — it adds it if missing, overwrites it if present, making it the safer default for most "stamp a field" scenarios.
- Also returns a new object without mutating the source — references to the original object elsewhere are unaffected by the change.
Related Workflow Definition Language functions
From Objects & JSON