Power Fx function
Logic, variables, and flow control
Top 12 most-used
ForAll
Repeats logic for every row.
What it does
Repeats logic for every row.
The job: Branching, looping, and state — the glue between reading data and changing it.
Try this
Adapt this formula from the nextM365 reference hub:
ForAll(Cart, Collect(Receipt, ThisRecord))How to use ForAll
Start from the task, not the alphabet. If you are shaping rows for a gallery, reach for ForAll alongside the other data functions in its group; if you are saving, navigating, or changing state, use it on an event such as a button OnSelect rather than in a display property. When a formula misbehaves, check for a blank value where you expected text, then confirm the behaviour against the examples in the Power Fx function reference hub.
New to the language itself? Read What Is Microsoft Power Fx? first, then come back here when you need this specific tool.