-
Excel Data – Paste and Patch
Have you ever want to grab a block of Excel data, paste it and display in Power Apps, then patch it to your data source as new records? The process involves a bit of user discipline grabbing the correct columns, but it works. The first bit requires two controls – a Text Input set to multi-line and expanded appropriately and a HTML Text box for displaying the result in a structured manner. Below is an Excel sheet that has simply has the content copied and then pasted into the Text Input The top section is the Text Input and the bottom a HTML Text box with the HtmlText of This displays the data in a structured column manner…
-
Send selected attachments on an email directly from Power Apps
Have you ever wanted to send only some of the attachments on your record via email to someone? The solution is actually quite straightforward, but requires a bit of trickery not evident in the picture below. The attachment control is a standard item in a form displaying the attachments on a record (I called this one acEmail ) – there are no modifications to it. The check boxes shown however are in a gallery placed “on top” of the attachment control – I called it galAttach here. You may have to adjust the TemplateHeight to get it to “line up” properly with the attachment control. The Items of this gallery are essentially a copy of the data in the attachment control. Two labels…
-
Dynamically filtered multi-select check boxes
Firstly, my thanks for the inspiration for this to Reza Dorrani in his great video. Please refer to it if necessary for the checkbox gallery insertion process. I am now taking this a couple of stages further with: – A short example of it working is below Firstly, if the code seems a little over-complex, it is due to some refreshing issues I had in testing and the below seems to work as intended. It is based off a test list of PC devices, but can be applied to any similar structure. As I mentioned, the primary radio control is stored in a Text field. For the secondary filtered item, create a Choice type column (as…
-
Search and autofill in text box based on List values
We are all used to web searches giving suggestions of possible values you want and Combo Boxes have a Search function, but Text inputs do not have anything built-in for this, so it should be useful to have this function as well. In the example below, the user starts typing and all matching values come up below. At any time they can press Enter and have the first (or only) matching value populate automatically in the Text Box. The process involves only three things – changes to the OnChange and Default of the Text box and a Label below. This example is from a test list I have, but will work on any list subject to size Delegation…
-
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. All affect the output in the gallery below. The list is sorted by Model Name and completely unfiltered looks like this The first Combo Box is from another list of Manufacturers, with the maker’s name also contained in…
-
Opening Attachments from Power Apps instead of needing to download.
Option 1 – View mode opening In the example below, the Form is started in Edit Mode, showing a normal attachment control, however once it is switched to view mode, a different attachment list appears with an icon at the right that allows direct opening of the attachment with “one click”. If the file can be opened in a browser (images, PDFs) it will do so, otherwise it will download. So what is going on here? Firstly, a small limitation – the “view mode” list is actually a gallery (which cannot be inserted into the form), so is simply placed in the same location as the Attachment Control. Consequently, if the Form is longer…
-
Basic debugging and error tracing
Introduction 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. Contents Intellisense Format Text Labels with values Looking directly at the data Using Variables and Collections Look at the error message Hover over your code Pull your code apart and reconstruct it And/Or confusion Back to top IntelliSense Firstly, IntelliSense is your best friend. It is a bit like a predictive Google…
-
Attaching Camera photos without either a Flow or JSON
In the below example, the “Photos” control is a normal (but re-purposed) Attachment Control on a form. The Attachment Control on the right is in another form displaying the same record to demonstrate that this works. The photo names are simply the time they are taken – you could use whatever you want here. So what is happening? Firstly, when the “Camera” icon is pressed, it does this OnSelect You also need to set your Camera StreamRate – 100 (one tenth of a second) seems to work well. And then the “Save” icon OnSelect You can probably delete the Refresh in most cases and would also clear the collection at Screen OnVisible. The Update of the Data Card (generally…
-
Power Apps Controls and their References
Contents General 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…
-
Starting your app – good practices
Planning your controls 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…