• 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

  • Data

    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…

  • 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

    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

    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…

  • Data

    Show size of attachment or uploaded file

    Have you ever wanted to show or use the size of an uploaded file – the process is below Attachment Firstly, you need a hidden image control with the Image Then on the OnAddFile (and OnRemoveFile if you want) Then the Label below has the Text Uploaded file A similar, but less complex process – on the OnChange of the AddMediaButton and the Label below All attachments on a record An expansion on #1 above – make a Gallery (called galAttach below) with the Items Now put an Image control in the Gallery (called imAttach below) with the Image You can now hide the gallery You will need to trigger the next piece, so a button with “Size” or…

  • Design

    Saving and displaying multi-choice Combo Box in a Text field

    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 Choice field Items Update of Data Card  DefaultSelectedItems List Field Next is a list based on a field from another List) – I will refer to the elements as follows Items Update of Data Card DefaultSelectedItems and that is about the extent of the process. I hope this is useful to you.

  • 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…

  • Data

    Enter Time directly instead of drop-downs

    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 TxtTime1 here and will use DateValue1 as the Date Picker name).  Set the DelayOutput of…