Constructing your first Power App – before you start
It is a bit like putting a roof on a house then wondering whether the foundations will hold it up – you need to construct your foundations to allow for the things you might want to do in the future.
You have opened your new shiny new O365 box and had a look inside. You have purchased an E3 licence as you do not want the additional expense of premium features and are now wondering what you can do with what you have. The answer is quite a lot and quite easily if you construct your data properly and this this blog is aimed at users falling into this category.
Starting your app – good practices
Now you have read my blog on Data Structure and have a great one in place, you are ready to get in and construct your app. You have put in a gallery and a form and are ready to write some code. What else do you have to do?
Firstly, planning to lay a foundation for your app, you need to know “where everything is”. You will have to refer to all of your controls (screens, galleries, forms, controls) constantly in your code. You are assisted in this endeavor by the built-in IntelliSense function, which “predicts” what you might want to type and displays it in a panel below where you are putting your code. Although this does not write code for you (and you can certainly put in values that are not what you are trying to do), but it does show you all the valid values that might apply at that stage of the code. Why am I mentioning this in particular – because you need to be able to start typing in a value you will already have an idea on what it is.
Power Apps Controls and their References
When you start your Power Apps journey and start working with controls and their inputs and output references, there is a lot of confusion and misunderstanding that can be quite easily alleviated, saving you both time and potential errors.
Initially, you had probably “left them alone” with the settings Power Apps provides when they were created, used SubmitForm() to save the data and all worked exactly as you expected. Now you are needing to refer to them in code and possibly change the settings in the control itself to meet your needs. All of this should not be overwhelming if you take a little time to understand a few basic things.
Basic debugging and error tracing
When you are building your app, putting in some code and see the “red squiggly lines” appearing under it, you immediately start thinking “what have I done wrong”. There are many forum posts with these types of questions that can be easily solved with a bit of investigation and knowledge of where to look for the issue.
Filters – combining multiple criteria
Filters use various criteria to “dissect” a data source returning the records required, generally for a gallery, collection or other data gathering exercise.
Simple Filters will generally refer to a Control (drop-down/combo box) where the selected value needs to match a field in the data source.
In this exercise, the model below is based on a simple data source (a list of PC Devices) with two combo box controls and a text input.