Functionality

  • Data,  Functionality

    Displaying and saving time in 12 hour AM/PM format

    When Power Apps sets up a Date/Time field, the hours are in 24 hour format. Have you ever wanted to work with a 12 hour AM/PM choice and display for the user ? Here is how Add another drop-down at the right with Items and the Default of this drop-down Then you need to change the Items of the Hour drop-down to and the Default of the Hour drop-down Now the Update of the Data Card for the Hour dropdown This all should now allow you to perform this function

  • Functionality,  Security

    Locking down SharePoint so only Integrated App can be used

    This is an issue that has been the subject of many questions and below is the series of processes which I believe adequately addresses the structure needed. Firstly, the three initial things to do (which I will not go into any depth with) are: – However, there are a number of inbuilt SharePoint functions that allow a reasonably knowledgeable user to circumvent these controls and do/see things they should not be able to do. The first thing to do is stop users from creating a Personal View to their liking. Firstly, go to Site Permissions > Permission Levels Personal Views Select Contribute and then at the bottom select Copy Permission Level A name is…

  • Functionality,  Helpful hints

    Detecting mobile device app operation

    There is a generally simple method of detecting a mobile device where being true will detect a mobile device (as opposed to a PC), but we now have “cross-over” devices with these sensors being used as office PCs – so how do we detect them? What we really need to know is if the app is being run in a browser or on the Mobile App.One method I have tested which works is this – try to save a file with SaveData – at App OnStart, run this and then test gblDevice for the value.NOTE: This will only work properly on a PC / browser if this setting is switched off in the App.

  • Functionality,  Helpful hints,  Images

    Email PDF of screen without (and with) a Flow

    The need to send a screenshot (it could be a form, invoice or anything else) as an email attachment straight from Power Apps is highly useful.The process actually is very simple using the PDF() function. Firstly, a temporary variable needs to be created with the file content and that used to form the email attachment. This one is to the user, but could be to any address. Note also you can send the same content to a Flow, but need to convert it to Base64 then do the normal base64ToBinary in the Flow

  • Functionality,  Helpful hints

    Choices columns – manage in SharePoint by Admin, but use Text field for Power Apps

    If you have read some of this site’s blogs, you may deduce that I have an aversion to complex column types for data fields in Power Apps unless there is a good and necessary reason to use them. On the lesser end of this scale, Choice columns cannot be used to Sort by in a Delegable manner and still in general add a level of complexity that may not be needed if you are only using single choices.You can of course “hard code” them in Power Apps Drop-down /Combo Box controls, but any changes require design privileges in Power Apps, not something you always want. So how do you write back to the desirable…

  • Functionality

    Emailing files from an Add Picture control directly from Power Apps (and include attachments)

    Have you ever wanted to upload files in Power Apps using the Add Picture control and attach these to an email without using a Flow?  It is actually not all that complex once the structure of the data Outlook expects is understood. Emailing uploaded file Firstly, starting with emailing the item uploaded – put an Add Picture control on the screen – I will call the Image Control in it imgAttachEmail and the Add Media Button ambFileAttach here for reference. Now down to business – the code on your send button/icon simply needs to grab the file content and name of the file uploaded and give them specific field names. and that is the extent of it. Your uploaded file…

  • Functionality

    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…

  • Dynamic,  Functionality

    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…

  • Data,  Functionality

    Prevent the use of Special Characters in a Text input

    This process prevents a user from saving a range of Special Characters if entered in a Text Input. This may have other application as well as the Text Box example. A working example is shown below So how does this work? Firstly do a Collection of all special characters (you can do this at Screen OnVisible) by using their ASCII value ranges. This puts 31 Special Characters into the collection under the field FieldNo.Below is a gallery (with wrap at 4) showing the characters Note you may want to allow some such as Underscore _ (95) and will have to adjust the above to suit.Now put this on the OnChange of the Text Box…

  • Functionality

    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…