Pragmatic Works Nerd News

Naming Standards and Conventions for PowerApps

Written by Brian Knight | Sep 24, 2018

By default, most controls and items in PowerApps are named in a very obscure way. This makes it difficult to find the control later in code and to make any modifications to visually. While it’s maybe not feasible to name every item in your application, it’s important to give commonly used ones an appropriate name.

To name an object, right-click on the object and select Rename. Any code that the was using the object’s name will also be refactored automatically for you in PowerApps. While there are a ton of potential naming standards for controls, I like the common camel-cased (first letter of each word is upper cased) standard where you have the first three letters of the control telling you what the control is, and the last letters are a noun and verb. For example, a gallery that shows a list of employees might be galEmployeeBrowse. A screen for browsing the same list of employees might be scrEmployeeBrowse where the one to edit might be scrEmployeeEdit.

Here’s a starting point for your naming standards for PowerApps.

3-Letter Qualifier

  • Screen - scr
  • Gallery – gal
  • Label – lbl
  • Variable – var
  • Collection - col
  • Icon – icn
  • All shapes – shp
  • Data Table – tab
  • Forms – frm
  • Charts (including Power BI reports) – cht
  • Button – btn
  • Image – img
  • Cards – crd
  • Check box – chk
  • Drop-down – drp
  • Date picker – dte
  • List box – lst
  • Radio – rdo
  • Toggle – tog
  • Slider – sld
  • Ratings – rat
  • Text Inputs (including rich and HTML)- inp

 

Sample Actions:

  • Browse
  • Edit
  • Add
  • Delete
  • Detail