Power Fx function
Clear — Power Fx function reference
Empty a collection.
Syntax
powerfx
Clear( Collection )
Examples
powerfx
Clear(colCart)
→ Now empty
powerfx
Clear(colCart)
powerfx
Clear(colCart); Notify("Cart cleared")Common mistakes & gotchas
- Clear only affects in-memory collections — calling it on a real data source like a SharePoint list does nothing to the underlying data.
- Unlike ClearCollect, Clear cannot reseed data in the same call; follow it with Collect/ClearCollect if you need to repopulate immediately.
Related Power Fx functions
From Collections & local storage