Décode l'informatique

Feedback on Power Apps developments

Maquette Power Apps - Identité

This feedback on Power Apps developments is simple and straightforward, without frills or philosophical considerations :). This is the one I wish I had found when I first started on Power Apps.

Of course, and as always, you have the right to have a different, even opposite, experience. And that’s good!

Last precision: it is far from being exhaustive.

Do not go directly into development!

Create a 1: 1 mock-up of the expected result.

Make the mockup with pencil, PowerPoint, Visio, Balsamiq, etc. : whatever. The breathtaking capabilities of Microsoft PowerPoint have convinced me for a long time. Sorry Jeff!

The mockup must be complete, detailed and precise. The sequences must be clearly defined: when the user clicks on this button, this happens, and so on.

Beware because changes are expensive once development has started. Indeed, the changes are simple to make but very tedious. This obviously depends on the number of screens involved.

Power Apps Mockup - Weekly Tracking
Power Apps Mockup – Weekly Tracking

Define base values ​​

The base values ​​are the main colors: the main theme and the associated sub-theme (RGBA (62, 96, 170, 1), AliceBlue, etc.)

This is also the chosen font (Arial, etc.), as well as the default size that will be used for the font (14pt, etc.).

Also define the default size of the icons, taking into account that there will be large icons (64x64px, etc.) and small icons (30x30px, etc.).

Optionally, you can also define the color of the gallery headers for the fill and the color of the text. You can also set the default height of the gallery template. Thus, you will have a uniform presentation of the contents.

All of these defaults should be stored in global variables. It probably never happens to you, but sometimes people change their mind :).

Power Apps Valeurs de base
Power Apps Valeurs de base

Define a naming plan

Name your controls, variables and collections according to a naming plan.

Indeed, there is no Find / Replace function: manually renaming a variable is tedious and long. It is therefore important to adopt a naming plan from the start.

For example, global variables start with GLB, local variables start with LOC.

Also note that unlike controls, collections and variables do not automatically rename.

You can take inspiration from Microsoft’s document “PowerApps canvas app coding standards and guidelines.pdf“. This document offers simple naming rules (extract):

  • Button: btn
  • Label: lbl
  • Text input: txt
  • Collection: col
  • Gallery: gal
  • Combo box: cmb
  • Shapes (rectangle, circle, … ): shp
  • Drop down lists: drp
  • Date: dte
  • Icon: ico
  • Image: img
  • Timer: tim
  • Html text: htm
  • etc.

In the list above, the first value is the name of the control, followed by the proposed suffix. The suffix comes before the name of the control.

Define your own naming conventions

Of course, you can define your own convention. In any case, it is extremely important, and useful, to stay consistent across all screens. For example, the control that displays the message should have a similar name on all screens. Remember that Power Apps does not allow having two controls with two identical names in an app.

In my applications, all the controls are prefixed by a code that I assign to each screen: IDENS01, IDENS02, etc.

Example of naming an icon type control:

 ico10aIDENS01

The number (10) and the letter (a) have no precise meaning. This is because unlike anything you can read on the web, including in Microsoft’s PDF document, it’s not a good idea to give controls a meaningful name in Power Apps.

It doesn’t help much, it can be confusing, even an error when the name is too long (in Power Automate). Source: https://powerusers.microsoft.com/t5/General-Power-Automate/The-datetime-string-must-match-ISO-8601-format/m-p/603496#M52598.

Conversely, having standardized names saves a lot of time in the search area of ​​the tree pane. In particular, this makes it possible to find all the identical controls on all the screens.

This is useful when you have 20 or 30 Power Apps screens to edit.

Power Apps Volet Arborescence
Power Apps Volet Arborescence

Write management rules and application events

Write business rules and events in black and white in a document.

Examples of business rules and events:

  • If the date is changed, the residual value is recalculated.
  • Entering the Label field is required to save.
  • The amount to be reimbursed is equal to the amount total less the amount to be deducted and less costs, etc.
Power Apps Ecrire Règles de Gestion
Power Apps Ecrire Règles de Gestion

Check the values ​​and your reasoning

Developing is making assumptions.

Also, add temporary labels to check the validity of the assumptions and to control the intermediate results.

Then, trace the progress of an application (if authorized), in particular with the Patch() function.

Power Apps Trace
Power Apps Trace

Microsoft365 Addict

Ajouter un commentaire