Tutorials/Power Apps/Power Fx Starter Pack: 12 Functions for Everyday App Building
Power Appsbeginner

Power Fx Starter Pack: 12 Functions for Everyday App Building

Stop memorizing hundreds of functions. These are the ones that do the heavy lifting. Once you internalize them, you can build most real-world apps from scratch.

NA
Narmer Abader
@narmer · Published June 3, 2026

Power Fx offers hundreds of functions, but when you open up real canvas apps — from inspection checklists to order management dashboards — you’ll see the same dozen or so patterns repeated over and over. This article walks through the essential functions that appear in nearly every app, using a concrete scenario so you can see how they work together.

We’ll build a property management app for Sunset Properties, a fictional company that tracks units, tenants, and maintenance requests. The main data source will be a SharePoint list called Units with these columns:

  • Title (the unit number, e.g. "A101")
  • UnitType (e.g. "Studio", "1BR", "2BR")
  • MonthlyRent (currency)
  • Status (choice: "Occupied" / "Vacant" / "Maintenance")
  • TenantName (text)
  • LeaseEndDate (date)
  • InspectionPassed (Yes/No)

We’ll also reference two other lists: Tenants (with full name, email, phone) and MaintenanceRequests (UnitID, description, priority, status). This scenario gives us plenty of chances to exercise the core functions.

All code examples use the Items property of a gallery or a button’s OnSelect, DisplayMode, or Visible unless noted otherwise.

Data Retrieval Functions

Filter

The workhorse of data display. Use Filter to show only records that match one or more conditions.

Filter(
  Units,
  Status = "Vacant" And MonthlyRent <= 1500
)

Put this in a gallery’s Items and you instantly have a filtered view. Filter also works with nested delegable operators like StartsWith and date comparisons.

Filter(Units, StartsWith(Title, txtSearch.Text))
Delegation

When working with large data sources (SharePoint, SQL Server, Dataverse), watch for the yellow triangle warning in the formula bar and the blue underline under non-delegable expressions. Filter can only push certain operators to the server — everything else runs on the first 500 rows fetched locally (you can raise this to 2,000 in app settings, but not higher). For most line-of-business apps this is fine, but be careful with tens of thousands of records where non-delegable filters will return silently incomplete results.

LookUp

LookUp returns a single record (the first match) rather than a table. Use it when you need one specific value from a data source.

LookUp(Units, Title = "A101")

A common pattern is to grab a field from the found record directly:

LookUp(Units, Title = "A101").TenantName

Common mistake: writing Filter(Data, Condition).First — that returns a table then takes the first record, which is both inefficient and requires knowing the table index. LookUp is cleaner and faster.

Sort / SortByColumns

Order a table before showing it in a gallery.

SortByColumns(Units, "MonthlyRent", SortOrder.Descending)

For multi-column sorts (e.g., by status then by rent), SortByColumns takes additional name/order pairs:

SortByColumns(
  Units,
  "Status", SortOrder.Ascending,
  "MonthlyRent", SortOrder.Ascending
)

Use SortByColumns when the data source is large and you want sorting to delegate. The regular Sort function does not delegate its column expression.

Conditional Logic

If

The expression version of “if … then … else”. Because it returns a value, you can place it in a label’s Text or a control’s Visible.

If(
  ThisItem.InspectionPassed = true,
  "✅ Passed",
  "❌ Failed"
)

Chain multiple conditions without nesting:

If(
  MonthlyRent >= 3000, "Premium Tier",
  MonthlyRent >= 2000, "Standard Tier",
  MonthlyRent >= 1000, "Economy Tier",
  "Budget Tier"
)

Switch

When you are testing one value against many possible matches, Switch is cleaner than stacked If.

Switch(
  ThisItem.Status,
  "Occupied", Color.Green,
  "Vacant",   Color.Blue,
  "Maintenance", Color.Orange,
  Color.Gray   // default
)

The last argument without a match becomes the default. Leave it out and Switch returns blank for any unmatched value — a quiet source of bugs.

Switch(ThisItem.Status,
  "Occupied", "Active",
  "Vacant",   "Free"
)   // if Status = "Maintenance", result is blank

Managing State and Navigation

UpdateContext / Set / App.Formulas

Three tools for different scopes and lifecycles.

UpdateContext — use for state that only the current screen needs.

UpdateContext({ showDetailPanel: true })

Set — when you need the value everywhere.

Set(varCurrentUserEmail, User().Email)

App.Formulas (named formulas) — for static values that don't change at runtime. Instead of initialising them in OnStart, declare them in App.Formulas and Power Apps evaluates each one just-in-time, cutting startup latency.

// In App.Formulas:
CurrentUserEmail = User().Email;
ActiveUnits      = Filter(Units, Status <> "Archived");

Rule of thumb: use App.Formulas for anything that reads data or derives a constant value. Use UpdateContext for screen-local mutable state. Use Set for cross-screen mutable state. Too many Set calls in OnStart blocks app startup — move them to App.Formulas first.

Move between screens, with or without a context record.

Navigate(
  ScreenUnitDetail,
  ScreenTransition.None,
  { selectedUnit: ThisItem }
)

On the target screen, use selectedUnit.Title etc. in labels. For a back button, simply call Back() — it returns to the previous screen.

Data Modification

Patch

The standard way to create or update a record in a data source.

Patch(
  Units,
  galUnits.Selected,
  {
    Status: "Occupied",
    TenantName: txtTenantName.Text,
    LeaseEndDate: DatePick.Value
  }
)

Patch can also create new records by using Defaults(DataSource) as the second argument, then passing field values.

Patch(
  MaintenanceRequests,
  Defaults(MaintenanceRequests),
  {
    Title: "M-" & Text(Now(), "[$-en-US]yyyymmddhhmmss"),
    UnitID: galUnits.Selected.ID,
    Description: txtDescription.Text,
    Priority: "High",
    Status: "Open"
  }
)

ForAll

Execute an expression once for each row in a table. The most common use is bulk-creating or bulk-updating data.

ForAll(
  colTempCart,
  Patch(
    MaintenanceRequests,
    Defaults(MaintenanceRequests),
    {
      Title: "BULK-" & Text(Now()),
      UnitID: UnitID,
      Description: Description
    }
  )
)

Inside ForAll, columns of the current row are available directly. If a column name overlaps with a field of the target, use the As keyword to alias the table:

ForAll(
  colTempCart As item,
  Patch(
    MaintenanceRequests,
    Defaults(MaintenanceRequests),
    { Title: item.Title, UnitID: item.UnitID }
  )
)
Performance

ForAll does not batch calls; it runs one record at a time in sequence (though each Patch call is atomic). For very large bulk operations, consider using a flow or other tool.

Collect / ClearCollect

Load data into a local collection (in‑memory table). Use ClearCollect on screen startup to pull the data you need.

ClearCollect(colUnits, Units)

Once in a collection, you can modify, filter, and sort without hitting the original source repeatedly. Use Collect to add rows to an existing collection.

Collect(colUnits,
  {
    Title: txtNewUnitNumber.Text,
    UnitType: ddUnitType.Selected.Value,
    Status: "Vacant"
  }
)

To commit back to the real source, you’d then call ForAll(colUnits, Patch(...)). This two‑step pattern avoids expensive per‑row calls while the user is still editing.

Performance and User Feedback

Concurrent

Fire multiple data source calls in parallel instead of one after another.

Concurrent(
  ClearCollect(colUnits, Units),
  ClearCollect(colTenants, Tenants),
  ClearCollect(colRequests, MaintenanceRequests)
)

If each request takes 0.5 s, sequential loading takes 1.5 s. With Concurrent it’s ~0.5 s. Users notice the difference, especially on slow connections.

Concurrent(
  Patch(Units, LookUp(Units, Title = "A101"), { Status: "Vacant" }),
  Patch(MaintenanceRequests, LookUp(MaintenanceRequests, Title = "M-001"), { Status: "Completed" })
)
Concurrent gotchas

Formulas inside Concurrent must not depend on each other — Power Apps flags cross-dependencies with a build error. Also, firing many simultaneous calls against the same connector can trigger throttling (HTTP 429 errors). If you see intermittent failures on startup, stagger the loads by splitting them across OnStart and the first screen’s OnVisible.

Notify

Toast‑style messages for the user. Replace hidden labels and message dialogs with a one‑liner.

Notify("Unit updated successfully", NotificationType.Success)

Other notification types: Information, Warning, Error. Pair with IfError for robust error handling.

IfError(
  Patch(Units, galUnits.Selected, { Status: "Occupied" }),
  Notify("Could not update unit. " & FirstError.Message, NotificationType.Error)
)

IsBlank / IsEmpty

Two different ways to check for “nothing”.

If(
  IsBlank(txtTenantName.Text),
  "Please enter a tenant name",
  "Tenant name entered"
)
If(
  IsEmpty(Filter(Units, Status = "Occupied")),
  "No occupied units",
  "Occupied units exist"
)
Use IsBlank for…Use IsEmpty for…
single valuestables/collections
text, number, dateSharePoint lists, collections, filtered results
“required field” validation“empty state” placeholders

Common Pitfalls & Troubleshooting

  • Forgetting the default in Switch leads to silent blank results. Always supply a fallback value.
  • Overusing Set for screen‑local state – reach for UpdateContext first to keep your app modular.
  • Using Filter where LookUp suffices – if you only need one record, LookUp is clearer and slightly faster.
  • Ignoring delegation – a blue underline means your filter runs locally. For large datasets, restructure the condition (e.g., use StartsWith instead of in on text columns, or move the logic to a calculated column in the source).
  • Not using Concurrent on screen load – sequential calls waste user time.

Final Recommendation

Internalize these 12 function patterns:

CategoryFunctions
Show dataFilter, LookUp, Sort / SortByColumns
LogicIf, Switch
State & navUpdateContext / Set, Navigate / Back
Modify dataPatch, ForAll, Collect / ClearCollect
FeedbackNotify, Concurrent, IsBlank / IsEmpty

Once these are automatic, you’ll write and read 80% of canvas app formulas without reaching for documentation. From there, expand into Concat, Sum, CountRows, Distinct, GroupBy, AddColumns, IfError, and With – but only when a real problem demands them.

References

  • Original source article by PowerStack Editorial (URL not available – this article was inspired by the same topic but contains original explanations and scenarios).
  • Microsoft Learn: Power Fx functions reference (official documentation for each function).
  • Microsoft Learn: Delegation in Power Apps (understand data‑source limits and delegation).