-
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
-
Displaying Days, Hours and Minutes between two Date/Time values
Have you ever wanted to see exactly how many hours, minutes and seconds are between two selected date/time values. The formula below assumes that the user has selected from two Date Pickers with the Hour and Minute value from drop-down controls (as are provided by a standard Power Apps Date and Time field controls). To explain briefly the logic
-
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…
-
Allowing a user to add a non-listed value to a multi-value field
I have used cbData for the Combo Box and MultiField for the field name in these examples. It is easy enough to allow a user to add a custom value to a single select Combo Box with a Data Card Update of so it simply uses the SeachText if entered and nothing is selected from it (or uses the selection as normal). But what about multi-select columns ? One fundamental issue here is that the SearchText is only accessible/visible when there are no other items selected, but we want to retain what is there presently and add the new item, so one compromise is the user needs to delete existing items that come up with the DefaultSelectedItems, but we can still retain…
-
Shift numbered items in a gallery by more than one row
There are many posts on reordering a gallery with up/down buttons, but what if you want to shift an item a large number of places and re-order everything in between in one action ? The assumption here is that the gallery contains a sequential numeric field, is sorted by this field and the user wants to change a row item to another position with the result that the gallery will then be sorted in the new order.Firstly, there are two possibilities on the number shift – it could be larger or smaller than its original position, so that needs to be dealt with separately. I have also allowed for there…
-
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.
-
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
-
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…
-
Delegation Management – Multi-Choice Combo Boxes
This article looks at some degree of Delegation Management where a Multi-select Combo Box is used to filter a Data Source for any matching values in either a Text or Single Choice field. The output is a Table and can be used as the Items of either a Gallery or a subsequent cascading value Combo Box. In the below, I have a list of Devices and a field (Text) called DeviceType. I have a Combo Box (cbType) containing a Distinct list of the DeviceType (see this blog on how to do that in a Delegable manner). I have also used the Len() function below as it covers both Blank and empty string “”.So firstly, the normal approach would be which of course is not Delegable and will get the appropriate warning (and will…
-
Distinct values for a large list field in Combo Box Items
This idea is an extension of a workaround in Combo Boxes dealing with large lists and the Delegation issues surrounding these and the Distinct function. I have tested this on a large list (30k items) and it works perfectly. Two caveats here – the number of items displayed in your combo box and the number of filtered items subject to the Distinct function (after the leading letters are entered) will both be subject to your Delegation Limit, but these should not generally be an issue. This example is using a big list Aircraft with a field Airline. The idea is to start typing the Airline name and all Distinct values starting with the input will then be avalable for selection in…