Something I frequently notice when reviewing other developers’ canvas applications is explicit Boolean comparisons. While there’s nothing technically wrong this this, it is redundant. If you’re in any kind of consulting or contract work, it’s likely that you won’t be supporting your app forever. And let’s be real, who hasn’t been confused by logic they wrote last week in their own applications they’re actively working on? It makes sense to make your Power Fx code as clear and concise as possible
Let’s say you have a button that’s only enabled for admins. Maybe you have some logic that runs in the app OnStart to determine if this is or isn’t true, and then you set that to a global variable we’ll call gblIsAdmin. Now in the button itself, the DisplayMode property would be dependent on this variable. Something one may write is
0 Comments