Power Apps (Power Fx) cheat sheet
Every entry is a real Power Fx function, operator, or reference. Examples assume a canvas app. Where a function behaves differently against a large data source, the delegation note tells you so — that is usually what separates a demo from a shipped app.
Creating & changing records
Patch(Tasks, ThisItem, {Status: "Done"})Patch(Tasks, Defaults(Tasks), {Title: txtTitle.Text})Patch(Tasks, colEdits)Defaults(Tasks)Remove(Tasks, galTasks.Selected)RemoveIf(Tasks, Status = "Archived")Update(Tasks, oldRec, newRec)UpdateIf(Tasks, Priority = "Low", {Status: "Closed"})Forms
Form behavior lives in functions; mode and errors live in properties on the form control.
SubmitForm(frmEdit)NewForm(frmEdit)EditForm(frmEdit)ViewForm(frmEdit)ResetForm(frmEdit)frmEdit.Mode = FormMode.NewfrmEdit.ErrorfrmEdit.LastSubmit.IDCollections & local storage
Collect(colCart, {Item: "Pen", Qty: 2})ClearCollect(colStaff, Filter(Staff, Active))Clear(colCart)SaveData(colCart, "cart")LoadData(colCart, "cart", true)Filtering, search & sort
This is where delegation matters most. Non-delegable functions silently cap at the row limit (default 500).
Filter(Staff, Department = "IT")Search(Staff, txtFind.Text, "Name", "Email")LookUp(Staff, ID = locId)Sort(Staff, LastName)SortByColumns(Staff, "LastName", SortOrder.Ascending)First(Sort(Orders, Created, SortOrder.Descending))FirstN(Orders, 10)Distinct(Staff, Department)CountRows(Filter(Tasks, !Done))CountIf(Tasks, Status = "Open")Conditional logic
If(Score >= 50, "Pass", "Fail")Switch(Status, "A", "Active", "I", "Inactive", "Unknown")IsBlank(txtName.Text)IsEmpty(colCart)IsBlankOrError(LookUp(Staff, ID = locId))Coalesce(txtNick.Text, txtName.Text, "Guest")IfError(Value(txtQty.Text), 0)And(Active, Approved)Or(IsAdmin, IsOwner)Not(IsBlank(txtName.Text))Text
"Hi, " & txtName.TextLeft("PowerStack", 5)Mid("PowerStack", 6, 5)Len(txtCode.Text)Upper("po-123")Proper("jane doe")Trim(" a b ")TrimEnds(" a b ")Substitute("a-b-c", "-", "/")Replace("2026", 1, 2, "19")StartsWith(txtFile.Text, "PO-")Find("@", txtEmail.Text)Split("a,b,c", ",")Concat(colTags, Value, ", ")IsMatch(txtZip.Text, "\d{5}")Char(10)Date & time
Now()Today()DateAdd(Today(), 7, TimeUnit.Days)DateDiff(StartDate, EndDate, TimeUnit.Days)DateValue("2026-06-13")DateTimeValue("2026-06-13 09:30")Text(Now(), "dd mmm yyyy")Date(2026, 6, 13)Time(9, 30, 0)Weekday(Today())Month(Today())Math & aggregation
Aggregations over large sources are mostly non-delegable — they run on the rows already pulled, not the whole table.
Sum(Orders, Amount)Average(Orders, Amount)Max(Orders, Amount)Count(Orders.Amount)CountA(Orders.Notes)Round(12.345, 1)RoundUp(12.31, 1)Mod(17, 5)Abs(-8)Rand()RandBetween(1, 100)Table shaping
AddColumns(Staff, "Full", First & " " & Last)DropColumns(Staff, "Email", "Phone")RenameColumns(Staff, "First", "FirstName")ShowColumns(Staff, "Name", "Department")GroupBy(Sales, "Region", "Rows")Ungroup(grouped, "Rows")ForAll(colEdits, Patch(Tasks, ThisRecord))With({tax: 0.1}, total + total * tax)Sequence(5)Concurrent(Refresh(A), Refresh(B))Table({n: 1}, {n: 2})Data conversion
Value("123.45")Text(1234.5, "#,##0.00")JSON(colCart, JSONFormat.Compact)ParseJSON(txtPayload.Text)Boolean("true")GUID()ColorValue("#742774")Records & scope references
These are operators and references, not functions — but you use them constantly.
ThisItem.TitleFilter(Orders, ThisRecord.Amount > 0)Self.FillParent.TemplateHeightForAll(Orders As O, O.Amount * 1.1)Connectors (real patterns)
SharePoint and Dataverse are added as data sources, then queried with the normal table functions. There is no SharePoint.GetItems() or Dataverse.Retrieve() in Power Fx — those are Power Automate connector actions.
Office365Users.MyProfileV2().jobTitleOffice365Users.SearchUserV2({searchTerm: txtFind.Text}).valueOffice365Outlook.SendEmailV2("a@x.com", "Hi", "Body")Filter('My List', Status.Value = "Open")LookUp(Accounts, accountid = locId)User().Email