50 Power Apps Functions, Patterns, and Connectors That Are Extremely Useful in Real Projects.
1οΈβ£ With() β Cleaner, More Maintainable Logic
π Instead of repeating the same calculation multiple times, With() lets you define it once and reuse it.
Example
With(
{ totalCost: Quantity * Price },
If(totalCost > 1000, totalCost * 0.9, totalCost)
)
π‘ Use case:
Reducing repeated formulas inside nested If()
β Makes your app easier to read, debug, and maintain
2οΈβ£ Concurrent() β Boost App Performance
π Runs multiple operations at the same time instead of sequentially.
Example
Concurrent(
ClearCollect(colUsers, UsersList),
ClearCollect(colRoles, RolesList),
ClearCollect(colDepartments, DepartmentsList)
)
π‘ Use case:
Improving screen load time
β Huge performance improvement in data-heavy apps
3οΈβ£ JSON() β Bridge Between Power Apps & APIs/Flows
π Converts data into JSON format for passing to Power Automate or external APIs.
Example
Set(
varPayload,
JSON(colRepeatingData, JSONFormat.IncludeBinaryData)
)
π‘ Use case:
Sending complex data like repeating sections to flows or external systems
β Very helpful for integrations
4οΈβ£ Office365Users Connector β Dynamic User Data
π Fetch user details directly from Microsoft 365.
Example
Office365Users.Manager(User().Email).DisplayName
π‘ Use case:
Auto-fetch manager for approval workflows and org-based routing
β Great for people-based business apps
5οΈβ£ ParseJSON() β Handle Dynamic or Unstructured Data
π Converts JSON back into usable Power Apps data.
Example
Set(varData, ParseJSON(varResponse));
Text(varData.name)
π‘ Use case:
Reading custom API responses or flow outputs
β Powerful when working with dynamic payloads
6οΈβ£ Patch() β Update or Create Records
π One of the most important functions for writing data.
Example
Patch(
Requests,
Defaults(Requests),
{
Title: txtTitle.Text,
Status: "Submitted"
}
)
π‘ Use case:
Creating or updating SharePoint, Dataverse, or SQL records
β
More flexible than SubmitForm()
7οΈβ£ SubmitForm() β Fast Form Submission
π Best when using an Edit Form control.
Example
SubmitForm(frmRequest)
π‘ Use case:
Simple create/edit screens
β Easy validation and built-in form behavior
8οΈβ£ Defaults() β Create New Records Properly
π Used with Patch() to create a new item.
Example
Patch(Tasks, Defaults(Tasks), { Title: "New Task" })
π‘ Use case:
Inserting new rows into a data source
β Essential for create operations
9οΈβ£ LookUp() β Find a Single Matching Record
π Pull one specific record based on a condition.
Example
LookUp(Employees, Email = User().Email)
π‘ Use case:
Finding the current userβs profile or a related record
β One of the most-used lookup functions
π Filter() β Return Multiple Matching Records
π Pull a table of records that match criteria.
Example
Filter(Requests, Status = "Open")
π‘ Use case:
Gallery filtering and dynamic data views
β Core function for real-world apps
11οΈβ£ Search() β User-Friendly Text Search
π Lets users search records by keyword.
Example
Search(Employees, txtSearch.Text, FullName, Department)
π‘ Use case:
Search boxes in galleries
β Great for user experience
12οΈβ£ Sort() β Basic Sorting
π Sort records ascending or descending.
Example
Sort(Tasks, Created, Descending)
π‘ Use case:
Newest-first or alphabetic lists
β Keeps data organized
13οΈβ£ SortByColumns() β Advanced Sorting
π Better when sorting by named column strings.
Example
SortByColumns(Requests, "Priority", Descending)
π‘ Use case:
Dynamic sort logic and reusable components
β
Often cleaner than Sort()
14οΈβ£ AddColumns() β Add Calculated Columns to Data
π Enrich records without changing the source.
Example
AddColumns(Projects, "OpenTaskCount", CountRows(Filter(Tasks, ProjectId = ID)))
π‘ Use case:
Displaying calculated values in galleries
β Very useful for dashboard-style apps
15οΈβ£ ShowColumns() β Keep Only Needed Columns
π Return a lighter version of your table.
Example
ShowColumns(Employees, "FullName", "Email")
π‘ Use case:
Reducing payload and shaping data for collections
β Helpful for performance and clarity
16οΈβ£ DropColumns() β Remove Unneeded Columns
π Strip away fields you do not need.
Example
DropColumns(Employees, "Modified", "Editor")
π‘ Use case:
Preparing leaner collections
β Good for cleanup before export or processing
17οΈβ£ RenameColumns() β Make Data Easier to Read
π Rename columns for cleaner app logic.
Example
RenameColumns(Employees, "displayName", "FullName")
π‘ Use case:
Standardizing inconsistent source column names
β Makes formulas easier to understand
18οΈβ£ ClearCollect() β Reset and Reload a Collection
π Clears a collection, then fills it again.
Example
ClearCollect(colProjects, Projects)
π‘ Use case:
Caching data on screen load
β Very common in production apps
19οΈβ£ Collect() β Add Items to a Collection
π Appends records to a collection.
Example
Collect(colCart, { Product: "Laptop", Qty: 1 })
π‘ Use case:
Temporary carts, staged entries, multi-row forms
β Great for in-app temporary storage
20οΈβ£ Clear() β Empty a Collection
π Removes all items from a collection.
Example
Clear(colCart)
π‘ Use case:
Resetting temporary data
β Simple but essential
21οΈβ£ UpdateIf() β Bulk Update Matching Records
π Updates every matching record in a source.
Example
UpdateIf(Tasks, Status = "Draft", { Status: "Submitted" })
π‘ Use case:
Mass-updating a set of records
β Faster than patching one by one in many cases
22οΈβ£ RemoveIf() β Delete Matching Records
π Deletes records that meet a condition.
Example
RemoveIf(colTempRows, IsBlank(Title))
π‘ Use case:
Cleaning incomplete temp data
β Handy in repeating section scenarios
23οΈβ£ ForAll() β Process Records One by One
π Loops through a table and performs logic.
Example
ForAll(
colItems,
Patch(Orders, Defaults(Orders), { Title: ThisRecord.Title })
)
π‘ Use case:
Saving repeating rows or running batch actions
β Extremely useful, but use carefully for performance
24οΈβ£ Sequence() β Generate Numbered Rows
π Creates a numbered table automatically.
Example
Sequence(10)
π‘ Use case:
Building temporary rows, pagination, row numbering
β Great helper function
25οΈβ£ CountRows() β Count Records Fast
π Returns the number of rows in a table.
Example
CountRows(colCart)
π‘ Use case:
Badge counts, validation, summaries
β Simple and practical
26οΈβ£ Sum() β Total Numeric Values
π Adds values across records.
Example
Sum(colCart, Qty * Price)
π‘ Use case:
Total cost, total hours, total quantity
β Essential for calculations
27οΈβ£ GroupBy() β Group Related Records
π Groups records into nested tables.
Example
GroupBy(Tasks, Department, GroupedTasks)
π‘ Use case:
Building grouped dashboards and summaries
β Powerful for analytics-style screens
28οΈβ£ Ungroup() β Flatten Grouped Data
π Turns grouped data back into a normal table.
Example
Ungroup(colGroupedData, GroupedTasks)
π‘ Use case:
Reversing GroupBy() results
β Useful in more advanced shaping
29οΈβ£ Distinct() β Get Unique Values
π Returns unique values from a column.
Example
Distinct(Employees, Department)
π‘ Use case:
Dropdown filters and unique lists
β Very common in filter panels
30οΈβ£ IsBlank() β Check for Empty Values
π Helps validate missing input.
Example
If(IsBlank(txtEmail.Text), Notify("Email is required"))
π‘ Use case:
Required field checks
β Basic but critical
31οΈβ£ Coalesce() β Return First Non-Blank Value
π Great for fallback logic.
Example
Coalesce(txtPhone.Text, txtMobile.Text, "No number")
π‘ Use case:
Default values and null-safe formulas
β
Cleaner than nested If(IsBlank())
32οΈβ£ IfError() β Safer Error Handling
π Capture and respond to failures gracefully.
Example
IfError(
Patch(Requests, Defaults(Requests), { Title: txtTitle.Text }),
Notify("Save failed", NotificationType.Error)
)
π‘ Use case:
Protecting save logic
β Makes apps more professional
33οΈβ£ Notify() β User-Friendly Messages
π Show success, warning, or error messages.
Example
Notify("Request submitted successfully", NotificationType.Success)
π‘ Use case:
Feedback after save, delete, or validation
β Essential for usability
34οΈβ£ Navigate() β Move Between Screens
π Sends users to another screen.
Example
Navigate(scrDetails, ScreenTransition.Fade)
π‘ Use case:
Multi-screen apps
β Core navigation pattern
35οΈβ£ Set() β Create Global Variables
π Store values across screens.
Example
Set(varCurrentUser, User().FullName)
π‘ Use case:
Global app state, selected IDs, mode flags
β Great for app-wide values
36οΈβ£ UpdateContext() β Screen-Level Variables
π Store values only for the current screen.
Example
UpdateContext({ showPopup: true })
π‘ Use case:
Modals, toggles, screen UI behavior
β Cleaner for local state
37οΈβ£ Param() β Read URL Parameters
π Pull values passed into the app URL.
Example
Param("RequestID")
π‘ Use case:
Deep linking from email, SharePoint, or Teams
β Great for launch scenarios
38οΈβ£ User() β Get Current User Information
π Returns current signed-in user details.
Example
User().Email
π‘ Use case:
Security filters, personalization, defaults
β Used everywhere in enterprise apps
39οΈβ£ Today() β Get Todayβs Date
π Returns current date only.
Example
Today()
π‘ Use case:
Due dates, date filters, default values
β Simple and useful
40οΈβ£ Now() β Current Date and Time
π Returns the exact current timestamp.
Example
Now()
π‘ Use case:
Audit timestamps, expiry logic, time tracking
β Useful for more precise workflows
41οΈβ£ DateAdd() β Add Days, Months, or Years
π Adjust a date dynamically.
Example
DateAdd(Today(), 7, Days)
π‘ Use case:
Due dates and reminders
β Common in business apps
42οΈβ£ DateDiff() β Calculate Time Between Dates
π Compare two dates.
Example
DateDiff(StartDate, EndDate, Days)
π‘ Use case:
SLA tracking, duration, aging reports
β Very practical
43οΈβ£ Text() β Format Values for Display
π Converts numbers and dates into readable text.
Example
Text(Today(), "[$-en-US]mmmm dd, yyyy")
π‘ Use case:
Friendly labels, display formatting
β Important for polished apps
44οΈβ£ Value() β Convert Text to Number
π Turns numeric text into a real number.
Example
Value(txtAmount.Text)
π‘ Use case:
Math on input fields
β Prevents calculation issues
45οΈβ£ Switch() β Cleaner Multi-Option Logic
π Better than stacked If() when checking many values.
Example
Switch(
drpStatus.Selected.Value,
"New", Color.Blue,
"In Progress", Color.Orange,
"Closed", Color.Green,
Color.Gray
)
π‘ Use case:
Status-based display logic
β
Much easier to read than long nested If()
46οΈβ£ Choices() β Pull Choice or Lookup Options
π Retrieves available values from a choice or lookup column.
Example
Choices(Requests.Status)
π‘ Use case:
Populating dropdowns and combo boxes
β Common with SharePoint and Dataverse
47οΈβ£ Refresh() β Reload a Data Source
π Pull the latest data from the source.
Example
Refresh(Requests)
π‘ Use case:
After save, delete, or approval actions
β Keeps data current
48οΈβ£ Launch() β Open Links, Files, or Emails
π Opens a webpage, SharePoint item, Teams link, or email.
Example
Launch("https://contoso.sharepoint.com")
π‘ Use case:
Open documents, send mail, jump to external systems
β Very useful for connected business apps
49οΈβ£ Power Automate Connector β Extend Beyond Power Apps
π Call flows directly from your app.
Example
MyFlow.Run(txtTitle.Text, User().Email)
π‘ Use case:
Approvals, PDF generation, email notifications, complex automation
β A must-have in enterprise solutions
5οΈβ£0οΈβ£ Form Modes β NewForm(), EditForm(), ViewForm()
π Control how forms behave.
Example
NewForm(frmRequest)
EditForm(frmRequest)
ViewForm(frmRequest)
π‘ Use case:
Switching between create, edit, and read-only modes
β Core pattern for structured app experiences