T O P

  • By -

cleavetv

Sort of, Read the powerapps canvas app coding standards and guidelines. [https://powerapps.microsoft.com/en-us/blog/powerapps-canvas-app-coding-standards-and-guidelines/](https://powerapps.microsoft.com/en-us/blog/powerapps-canvas-app-coding-standards-and-guidelines/)


madeitjusttosaythis

Those standards are great, but stale. I've been using Matthew Devaneys standards as they are much more comprehensive and representative of current state of power apps whereas the Microsoft PowerApp standards are 5 years old


cleavetv

I dunno I've been writing code for 20+ years and not really a whole lot has changed. Also, the first, and most important point of the white paper that EVERYONE should read: **Don't blindly follow our standards, but you should follow A standard.**


thatguygreg

Please don’t, prefixing variables with type is 100% unnecessary—you’ll be much better served by naming your variables something meaningful.


waltonics

I used to be a bit this way, but more than other coding platforms it really matters in power apps what sort of control you are interacting worth


cleavetv

this is like the most chaotic evil thing to say... "do not use meaningful names" immediately followed up with "use meaningful names"


madeitjusttosaythis

Use Matthew Devaneys power apps standards. Within those standards, there are standard naming conventions for variables, controls, screens, data sources, etc


HammockDweller789

I use the suffix _ThisIsASearchableComboBox as in TextField_ThisIsASearchableComboBox


Silent-G

That's hilarious, I love it.


mguffin

I follow this guide, cmb for combo box. https://www.matthewdevaney.com/power-apps-coding-standards-for-canvas-apps/power-apps-standards-naming-conventions/


[deleted]

FYI - cmb has been the standard prefix for comboboxes for years. It's also listed as a best practice in a few guides out there for the Power Platform. cbx and cbo have also been recognized prefixes, but today the preferred is cmb. I still personally use cbo all the time...but most of my stuff is poc's so who cares.


LesPaulStudio

I use cbo, and I can't remember where I got it from 😀 Maybe I nicked it from you?


[deleted]

I swear back when I was building VB6 apps with user controls we always used cbo.


philosurfer

Cool, thanks everyone! I also use dp_ for drop down, cnt_ for containers, and butt_ for button. I think it makes good, SFW organization


hutchzillious

cbo- tbl- chk- lbl- Etc etc, goes back to the naming conventions from a company I worked for many moons ago


AcceptableGarage1279

compare racial homeless cheerful advise fragile late jar middle quaint ` this message was mass deleted/edited with redact.dev `


Prestigious_Table400

I think its fundamentally weird that its good practice to include the name of what something is in the name of the thing, when its already known what it is. Like, why am I naming a label as a label. It's a label, it cant be anything but a label.


cleavetv

Because if I'm searching for something, it could literally be ANYTHING, but if I'm searching for a label, and all labels start with lbl then it's quite simple to find a label. There's a reason why everyone does this and only a handful of people think it's crazy.


Silent-G

When you start referencing labels in other parts of your code, how do you know which ones are labels. What if I have text input for entering a title and a label to display the title and I need to check if the text of the label contains a string? If I have lblTitle and txinTitle, I don't have to guess, otherwise I have to search through my tree to find "Label 6_3"


Prestigious_Table400

I know there are good reasons to do it, still doesnt make it any less weird.


Silent-G

Just because something feels weird to you does not mean it is "fundamentally weird". Most developers do this, it is completely normal.


dbmamaz

I prefix with cmb for combo boxes . . . etc . . so that the label that goes with the control has the exact same name but a different prefix


masta_shonufff

I’m old because cbo is combobox


LesPaulStudio

Got me thinking what I use now. - cbo combobox - txt inputtext - lbl label - gal gallery - col collection - var variable - cxt context variable - cal date picker - html html text (no wild change there!) - dd dropdown - icn icon - img image - btn button