Ever find yourself hunting for Power Apps formula examples, only to end up bouncing between confusing web pages or posts that don’t quite fit your project? We get it—that’s why we put together this go-to list of formulas and best practices that actually come up in real apps, whether you’re a total beginner or you’ve been building for a while. We’ll keep growing this list over time, so check back any time you need a quick answer (or a little inspiration).
Power Apps: Best Practices from the Real World
Before you dive into formulas, take a few minutes to set yourself up for success. Here’s what we always recommend:
- Give Things Real Names:
Power Apps likes to spit out objects with names like “Datacard4” or “Textbox3”… which, let’s face it, gets confusing fast. Take a moment to rename your cards, fields, and controls. Future-you (and your teammates) will thank you when you’re adding logic or fixing a bug. - Plan Your Screens (and Commons Areas):
Think about what you want on every screen—like navigation bars or footers—upfront. You might save yourself headaches later if you set up reusable components. It’ll make your app feel more polished and run a bit smoother, too. - Respect the Brand:
If your company has colors, logos, or brand fonts, get those decisions sorted early. No official branding? Pick a color palette that everyone likes and stick with it. Consistency can make even a simple app feel professional. - Know Your Data Needs (Now and Later):
Power Apps has some limits for how much data it can grab at once. Think about where you’ll store data, what you need now, and what you might grow into later. Do a little planning before you start connecting to sources. - Pick Your Playground:
Are you building this on your own, or is it a team sport? Managing your own side project? It’s fine to work in live mode. Sharing with a bigger team or part of a company with lots of Power Apps? Build in a separate development environment if you can—you’ll save yourself trouble during testing.
Super Useful Power Apps Formula Examples
Filtering a Gallery with “Or” Across Fields
Let’s say you want a search box that checks for matches in more than just one field—maybe title, status, or who’s assigned. Here’s how you can make that happen:
- Add a text input (call it “Searchbox”).
- Imagine you’re working with a data source called CompanyTasks (fields: Title, Status, and AssignedTo).
- Drop a gallery into your screen and set its “Items” property to filter with “Or” logic.
Formula:
Filter(CompanyTasks, Or(
Searchbox.Text in Title,
Searchbox.Text in Status,
Searchbox.Text in AssignedTo
))
Want to be extra user-friendly? Decide if you want the search to work from the start of the text or anywhere inside. Remember to check delegation limits if you’re using big data sources!
Clearing Out a Textbox or Field (the Fun Way)
Adding a little X icon to clear a search field? Here’s how:
- Make sure your input’s named clearly (like “Searchbox”).
- Put a ‘Cancel’ or ‘Clear’ icon next to it for easy access.
- On that icon’s “OnSelect”, write:
Reset(Searchbox)
Swap in your field’s actual name if it’s different!
Handy Line Breaks in Labels or Inputs
Need your text to have separate lines (like addresses or paragraphs)? Use Char(13):
“Line 1” & Char(13) & “Line 2”
Double it up for an empty line between:
“Line 1” & Char(13) & Char(13) & “Line 2”
Use in either a label’s “Text” or a textbox’s “Default” property. Pick the control that fits best for your end goal.
Opening SharePoint Files in a New Tab
Want users to click a file and view it in a separate browser tab?
- Set up your SharePoint document library.
- Connect it to a gallery in your app.
- On your “open” icon’s “OnSelect” property, use:
Launch(ThisItem.’Link to item’)
Easy as that!
Show or Hide Fields Based on a Condition
Want some fields to pop up only when needed? Write your logic once, reuse it:
- Label your fields with real names.
- Set a control’s “Visible” property to your conditional formula (like Dropdown.Selected.Value = “Other”).
- Copy and tweak as needed!
Power Apps Formulas & Best Practices Frequently Asked Questions
What are some best practices for using formulas in Power Apps?
Best practices include renaming objects for clarity, planning screens and reusable elements in advance, adhering to branding guidelines, understanding data source limitations, and considering whether to use a separate development environment. These steps make apps easier to maintain, scale, and troubleshoot.
How do you filter a Power Apps gallery with multiple criteria?
To filter a gallery using an ‘Or’ statement across multiple fields, use a formula like:
Filter(CompanyTasks, Or(Searchbox.Text in Title, Searchbox.Text in Status, Searchbox.Text in AssignedTo))
This lets users search various fields at once. Always be mindful of delegation limits to ensure performance, especially with large data sources.
How can I clear a text input in Power Apps using a formula?
Add a button or icon (like a cancel icon), then set its OnSelect property to:
Reset(YourTextInputName)
Replace “YourTextInputName” with the actual name of your text box. This instantly clears the field when the icon is tapped.
What is the formula for adding line breaks in Power Apps labels or textboxes?
Use Char(13) for a line break. For example:
“Line 1” & Char(13) & “Line 2”
Double Char(13) gives you an extra blank line:
“Line 1” & Char(13) & Char(13) & “Line 2”
How can I open a SharePoint Online file in a new tab from Power Apps?
Use the Launch function in the icon/button’s OnSelect property:
Launch(ThisItem.’Link to item’)
This opens the selected SharePoint file in a new browser tab.
How do you conditionally show or hide fields in Power Apps?
Create a logical formula (for example, based on user selections or roles) and set it as the Visible property for the field:
If(Toggle1.Value, true, false)
Or, use any logic that makes sense for your scenario.
Why should you rename controls in Power Apps?
Renaming controls from defaults like “DataCard1” to descriptive names (e.g., “txtFirstName”) makes your app easier to read, maintain, debug, and extend—especially on larger projects or teams.
What are delegation limits in Power Apps and why do they matter?
Delegation limits restrict how much data Power Apps pulls from connected data sources. If your formula isn’t delegable, it only processes the first 500 records by default—potentially missing results. Always check delegation warnings and optimize formulas for performance.
Is it necessary to use a development environment for building Power Apps?
If you’re developing solo and have only a few apps, working in production might be fine. However, if multiple people contribute or your environment is complex, use a separate development environment to reduce risk and improve collaboration.
How should you approach styling and branding in Power Apps?
Consult company branding guidelines or choose a consistent color scheme and fonts early. Apply these consistently for a professional, user-friendly interface, and confirm that users like your choices before rolling them out widely.
Need More Tips?
Got a formula you just can’t crack or a weird Power Apps challenge? Drop us a line any time. We’re always adding new ideas and would love to hear what’s working (or driving you crazy) in your apps!