Power Apps Naming Conventions I Wish I Used From Day One
Source: Dev.to
Introduction
When I first started building Power Apps, I didn’t think naming conventions mattered. Everything worked… until my app grew and formulas became impossible to read. A few simple naming habits completely changed how easy my apps were to maintain.
Why Naming Conventions Matter
- Readability – Clear names make formulas understandable at a glance.
- Debugging – It’s easier to locate the source of an issue.
- Maintenance – Future changes are quicker when you know what each element does.
- Collaboration – Team members can jump in without a steep learning curve.
Microsoft’s Power Apps coding guidance recommends using consistent naming for screens, controls, variables, and collections because it improves readability and maintainability.
General Naming Pattern
prefix_Purpose
- prefix – Indicates the control type (button, label, text input, etc.).
- Purpose – Describes what the control does.
Example
btn_SubmitFormtxt_UserEmaillbl_StatusMessage
Control Prefixes
| Control Type | Prefix | Example |
|---|---|---|
| Button | btn_ | btn_Submit |
| Label | lbl_ | lbl_Status |
| Text Input | txt_ | txt_Email |
| Gallery | gal_ | gal_Employees |
| Form | frm_ | frm_Request |
| Dropdown | drp_ | drp_Department |
| Checkbox | chk_ | chk_Approved |
| Icon | ico_ | ico_Delete |
Goal: prefix = control type + name = what it does.
When you see btn_SubmitRequest, you instantly know it’s a button that submits a request.
Screen Naming
Descriptive screen names improve both developer experience and accessibility.
Good examples
HomeScreenEmployeeRequestScreenApprovalScreen
Bad examples
Screen1DashboardPage2
Variable Naming
Variables should indicate what they store and their scope.
| Scope | Prefix | Example |
|---|---|---|
| Global | gbl | gblUserEmail |
| Context (local to a screen) | loc | locIsLoading |
| General | var | varSelectedItem |
Collection Naming
Collections typically start with col_ and describe their contents.
colEmployeescolNavigationMenucolActiveRequests
Putting It All Together
Instead of generic names like Gallery1, Label4, Button2, use descriptive prefixes:
gal_Employees
lbl_EmployeeName
btn_SaveEmployee
Now formulas read like actual logic:
If(
btn_SaveEmployee.Visible,
/* your logic here */
)
Much easier to understand.
The Most Important Rule
There isn’t a single “perfect” naming system. Different teams may adopt slightly different patterns, but consistency is key. A consistent naming structure makes apps easier to navigate, debug, and maintain over time.
Quick Checklist
- Use clear prefixes for every control type.
- Describe the purpose of each control, screen, variable, and collection.
- Keep naming conventions consistent across the entire app.
Your future self (and your teammates) will thank you!