Displaying Days, Hours and Minutes between two Date/Time values
Practical Power Apps Blog
by Warren Belz
3M ago
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). With( { _Calc: DateDiff( StartDatePicker.SelectedDate + Time( Value(StartHourDD.Selected.Value), Value(StartMinuteDD.Selected.Value), 0 ), EndDatePicker.SelectedDate + Time( Value(EndHourDD.Selecte ..read more
Visit website
Locking down SharePoint so only Integrated App can be used
Practical Power Apps Blog
by Warren Belz
5M ago
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: – Configuring any SharePoint Views to display only the columns the users need to see. Filtering the View data so that it displays only the records required to be available for choosing. I am assuming here that the users need to see records other than those they created. Configuring the Integrated App to restrict the users (or the particular user) to onl ..read more
Visit website
Allowing a user to add a non-listed value to a multi-value field
Practical Power Apps Blog
by Warren Belz
1y ago
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 {Value: Coalesce(cbData.SearchText, cbData.Selected.Value)} 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 r ..read more
Visit website
Choices columns – manage in SharePoint by Admin, but use Text field for Power Apps
Practical Power Apps Blog
by Warren Belz
1y ago
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 ..read more
Visit website
Distinct values for a large list field in Combo Box Items
Practical Power Apps Blog
by Warren Belz
1y ago
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 t ..read more
Visit website
Saving and displaying multi-choice Combo Box in a Text field
Practical Power Apps Blog
by Warren Belz
1y ago
It is well documented how to save the contents of a multi-select combo box to a Single Line of Text field, but not so how to successfully get the content back into the DefaultSelectedItems of the control. I will do two examples here (both related) – one on a Choice field and the other on a list of items. Items referenced as follows Text field being written to in the main list – TextField1 Choices field name being used – ChoiceField1 SharePoint list name SPList1 Name of the Combo Box – Combo1 Choice field Choices(SPList1.ChoiceField1) Items Update of Data Card ..read more
Visit website
Enter Time directly instead of drop-downs
Practical Power Apps Blog
by Warren Belz
1y ago
Have you ever wanted to throw away the drop-downs that Power Apps supplies for time fields and simply have the user enter a valid time. For this you would also want to display the time currently stored in the data source and do both in an hh:mm format. It is not as difficult or complex as you may think and can also all be done within a SubmitForm() action using the Update property of the data card. Here are the steps required. Unlock the card and delete the two drop-downs for hour and minute and the separator and add a Text Control (I will call it TxtTi ..read more
Visit website
Shift numbered items in a gallery by more than one row
Practical Power Apps Blog
by Warren Belz
1y ago
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 the ..read more
Visit website
Detecting mobile device app operation
Practical Power Apps Blog
by Warren Belz
1y ago
There is a generally simple method of detecting a mobile device where Location.Altitude > 0 || Acceleration.X > 0 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 Set( gblDevice, If( IsError( SaveData( Table ..read more
Visit website
Email PDF of screen without (and with) a Flow
Practical Power Apps Blog
by Warren Belz
1y ago
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. With( {wPDF: PDF(ScreenName)}, Office365Outlook.SendEmailV2( User().Email, "Subject here", "Body here", { Attachments: { Name: "PDFFileName.pdf ..read more
Visit website

Follow Practical Power Apps Blog on FeedSpot

Continue with Google
Continue with Apple
OR