PowerApps autogenerates a name for each Control as its added to the screen. Its imperative that you override the autogenerated name with a standard naming convention that is agreed upon (and documented!) within your org.
The top 3 reasons for adopting a standard naming convention for all PowerApps development:
These two go hand-in-hand. Consider this, an app has 8 buttons. The PowerApps autogenerated name for each button is
Button2 etc. for each button added.
Without a naming standard in place for Controls and Objects, there is no at-a-glance understanding of what is happening in the code.
TESTTHISTHINGa Variable or a Collection?
Switch(TESTTHISTHING.column1, "Feel Lucky?", Select(Button1), "Feel Lucky??", Select(Button5), "Feel Lucky???", Select(Button8) "Remember me???", Select(Button2) )
This looks so much better!
Switch(varTestThisThing.goodStandard, "Feel Lucky?", Select(btnPleaseNo), "Feel Lucky??", Select(btnEject), "Feel Lucky???", Select(btnNew) "Remember me???", Select(btnStop) )
Take it a step further and group the similar Controls
When you implement a clean and standardized naming convention, PowerApps' built-in Intellisense becomes even more useful.
Lets look at the same example as before. If I have a solid naming convention in place, and I begin writing the
Switch() statement from above... Look at what happens when I'm ready to call one of my Button Controls.
I start typing
btn and all Buttons in my app become available below the Function window.
This is sweeeeet! By hitting the down arrow on the keyboard then
Tab, I can select the Button I need to reference and keep truckin'. If the Buttons were not named according to any standard, I'd have to find the button in the app, click on it, and see which Control lights up in the Tree View on the left (boo!).
Hopefully these examples convey just how important this is for Low Code Developers. If you are going to take PowerApps seriously, establish and communicate a naming convention for all Controls and Objects.
Below is the standard I use. Feel free to take the best elements and build them into your own PowerApps!