

Why this exists: Microsoft's function reference is huge. You need the handful you use all the time, in one place.
For you if: You build canvas apps and keep forgetting the exact syntax for Patch or LookUp.
Ground truth: Condensed from Power Fx formula reference. Function details: Patch, Filter and LookUp, Collect and Clear.
| Formula | What it does | Example |
|---|---|---|
| Patch | Create or update a record | Patch(Contacts, Defaults(Contacts), {FirstName: "Jane", Email: "jane@example.com"}) |
| Patch (update) | Update existing record | Patch(Contacts, LookUp(Contacts, Id = varCurrentId), {Status: "Active"}) |
| Collect | Add rows to a collection (or create one) | Collect(colItems, {Name: txtName.Text, Qty: 1}) |
| Clear | Remove all rows from a collection | Clear(colItems) |
| Remove | Delete a record | Remove(Contacts, LookUp(Contacts, Id = ThisItem.Id)) |
Patch(Datasource, Defaults(Datasource), {...}) — Defaults gives you a blank record to fill.Patch(Datasource, RecordToUpdate, {...}) — You need the record (often from LookUp or ThisItem).| Formula | What it does | Example |
|---|---|---|
| LookUp | Single record matching criteria | LookUp(Contacts, Email = txtEmail.Text) |
| First | First record from a table or filter | First(Filter(Contacts, Status = "Active")) |
| Filter | All records matching criteria | Filter(Contacts, Status = "Active" && Region = "West") |
| CountRows | Number of rows | CountRows(Filter(Contacts, Status = "Active")) |
| IsBlank | True if null/empty | IsBlank(txtName.Text) |
LookUp vs First: LookUp returns one record or blank. Use when you expect 0 or 1 match. First returns one record from a set. Use with Filter when you want "first of many." If nothing matches, First returns blank (and can cause errors if you dot into it).
| Formula | What it does | Example |
|---|---|---|
| Text | Convert to text | Text(Now(), "yyyy-mm-dd") |
| Value | Convert text to number | Value(txtQuantity.Text) |
| Concatenate | Join strings | "Hello, " & User().FullName |
| Trim | Remove leading/trailing spaces | Trim(txtInput.Text) |
| Round | Round a number | Round(12.456, 2) → 12.46 |
| Formula | What it does | Example |
|---|---|---|
| If | Branch on condition | If(toggleOn.Checked, "Yes", "No") |
| Switch | Multiple conditions | Switch(varStatus, "A", "Active", "P", "Pending", "Inactive") |
| Coalesce | First non-blank value | Coalesce(txtOverride.Text, lblDefault.Text) |
| Formula | What it does | Example |
|---|---|---|
| ThisItem | Current item in gallery/list | ThisItem.Title |
| ThisRecord | Current record in form | ThisRecord.Status |
| Set | Store in variable | Set(varSelectedId, ThisItem.Id) |
| UpdateContext | Store in context variable | UpdateContext({varCount: varCount + 1}) |
Set vs UpdateContext: Set is global for the screen. UpdateContext is for local context. For most app logic, Set is enough.
| Formula | What it does | Example |
|---|---|---|
| Items | Data source for gallery | Items = Filter(Contacts, SearchTerm in Name) |
| Selected | Selected item in gallery | Selected = galContacts.Selected |
| Sort | Order rows | Sort(Contacts, CreatedDate, Descending) |
| AddColumns | Add calculated columns | AddColumns(Contacts, "FullName", FirstName & " " & LastName) |
Part of the Quick Reference Kit from elijah.ai. Built for Power Apps makers. All content pulls from Microsoft Power Fx documentation.