Cookbook
Power Apps Collections Cookbook
Collection recipes for staging data, shaping tables, grouping rows, creating carts, and preparing records for Patch.
Power Apps collectionsClearCollectGroupByPower Fx table shaping
Who this helps
Makers who need local working sets, temporary edits, grouped summaries, and repeatable table transformations.
What to standardize
- Use collections intentionally as local working data.
- Shape columns before galleries and patch operations consume them.
- Group, summarize, and rank rows with clear formulas.
- Keep memory use and delegation tradeoffs visible.
Examples
Create a review queue
Load a manageable set of records for triage work.
Formula / code
ClearCollect(
colReviewQueue,
ShowColumns(
Filter(Requests, RequestStatus.Value = "Ready for Review"),
"ID",
"Title",
"Priority",
"AssignedTo",
"Modified"
)
);Expected result: The gallery works against a smaller local table with only the columns needed for review.
Common mistakes
- Loading entire lists
- Keeping unused columns
- Forgetting data can become stale
Patch staged edits
Save only rows changed in a local review cart.
Formula / code
ForAll(
Filter(colReviewQueue, IsChanged = true) As changedRow,
Patch(Requests, LookUp(Requests, ID = changedRow.ID), { ReviewerNotes: changedRow.ReviewerNotes })
);Expected result: Only edited rows are written back, reducing unnecessary updates.
Common mistakes
- Patching every row
- Losing the source ID
- Treating local data as the source of truth