Power Fx function
ForAll — Power Fx function reference
Evaluate a formula per row.
Syntax
powerfx
ForAll( Table, Formula )
Examples
powerfx
ForAll(colEdits, Patch(Tasks, ThisRecord))
→ Runs per row
powerfx
ForAll(colCart, Patch(Products, LookUp(Products, SKU = ThisRecord.SKU), {Stock: Stock - ThisRecord.Qty}))powerfx
ForAll(Sequence(5), Notify("Step " & Value))Common mistakes & gotchas
- ForAll is not a loop with side-effect order guarantees — keep each iteration independent.
- ForAll returns a table of the Formula results and can itself be captured with Set — but when used purely for side effects (Patch, Notify per row) that returned table is usually just discarded.
- Row processing order is not guaranteed to be sequential — each iteration is meant to be independent; don't write formulas where row N depends on row N-1's side effect having already run.
Related Power Fx functions
From Table shaping