Need for a tree control

More complex controls with PowerApps are definitely needed, and maybe these will comes as the product continues to mature. One such control that is definitely needed and often used is a tree control.

At the moment to implement a tree within PowerApps we’re forced to cludge together nested galleries, however if you need greater than a two-level tree you’re out of luck and need to come up with another solution. I did spot someone’s solution albeit written in Japanese, sadly my understanding begins and ends with sushi.

I spent today desperately trying to get that third-level gallery to happen as the data I’m trying to show requires it. No joy sadly, however the site I was referencing did teach a few tricks I will take away for future reference, namely:

  • Items: rather than creating a collection, specifying the items via a GroupBy command and within also using the AddColumns command
  • The nested gallery specified its height to be calculated by the number of items multiplied by the template size. That said, this didn’t work for me so it may need tweaking to actually work.

Back to the drawing board.

Patching just stopped

Recently we decided we’d like to start capture how much effort was expanded working on our tickets. Reason being, assumptions may be that tasks may take little time when instead they may actually consume far more time, recording this would allow us to demonstrate this via PowerBi reporting.

I quickly added a time estimate field to our tickets SharePoint list and thought we were home and house. It all looked as though things were patching, then today I noticed statuses weren’t updating, weird. As soon as I removed the field from the patch statement all worked again, seemed it didn’t like having a number text entry field, it wanted it to be a text field and have that converted to a number, queue X-Files theme music.

All part of the learning curve!

Sticky sticky

After launching the latest update to the Support Desk app I was working in our section of the app, excited to the tickets list then re-entered to view this items data. The previous ticket I had updated its status to closed and this ticket just selected has a status of new, however it was restraining the previous ticket’s status; a bug was discovered.

With redeveloping the app I had swapped away from PowerApps forms as I needed to mix form elements from two SharePoint lists. Swapping over meant losing use of NewForm() that just resets everything for you, as I just discovered. I found it was best to apply resets to form elements as I exited the screen, using the screen’s OnHidden event, also applying first thing as I enter the screen via OnVisible, just for extra insurance.

Thankfully this was an easy fix and bug quashed. I hope they beef up forms functionality to support more complex builds.

But which version are you running?

Ever since swapping away from my 365 account at work to a service account for PowerApps development we’ve experienced issues. Most notably, Power Automate flows just seem to fail where previously they never did. So, I rebuild these flows using the Service Account, reconnect everything within the PowerApp, and things just work once more. The flow doesn’t have a single step changed, or any new connectors, just ownership.

One thing that truly irks me with PowerApps development is adding a flow to your app, why when doing this must Microsoft insist on wiping out all other codes from the formula bar? It’s seriously annoying, right? Having to remember to copy your code prior to insertion of a new flow truly sucks the big one.


I recently was forced to replace one flow that was used to handle approvals as it kept flaking out on me. In creating the new one under the service account I decided to turn off the old one as this would then indicate to me if someone was running a cached version, which occurred today.

I decided there needed to be a way to highlight to our users when we’d updated our app, something we could announce to them for comparison. I eventually discovered how to go about achieving this, firstly adding the PowerApps for App Makers component. Through this component you’re then able to discover data about apps, pulling this into a collection.

ClearCollect(GetApps,PowerAppsforMakers.GetAppVersions(Last(Filter(PowerAppsforMakers.GetApps().value,properties.displayName = "My Apps Name")).name));
Set(theVersion, Lookup(GetApps, First(, properties.appVersion))

I found when collecting the apps data for my app I was getting several rows returned, the last row contained the most recent published version. I then use a lookup to store this into a variable which I later use within a label for display. The version data displays date and time the app was last published, this makes it easier I think for users to identify whether they’re using an up to date release, version numbers I think have less meaning.

Sadly, I can’t get around the catching issue and must get users to remember to either clear their cache or force refresh to ensure they’ve the most recent version. I’m about to publish a much more substantial update to our service desk that incorporates:

  • Tabbed interface
  • Variable-height galleries with rich text support for comments
  • Introduction of private work notes for our team
  • Dynamic save button (mainly to accommodate the new tabs – I didn’t want multiple save buttons – bleh!)
  • Smarter forms for task assignment

Looking forward to deploying this new release, I think the team will enjoy using it.

Why so difficult to blank?

I’ve made quite the progress in enhancing the support desk app; ironically my supervisor emailed a request for a feature to be added which I’d added just the day prior – rich text comments.

One thing I’ve sadly not managed to achieve is being able to de-assign a task on that rare occasion a task is no longer assigned to someone. For some reason the removal of person claims from SharePoint person field is akin to walking on water, Microsoft hasn’t made this easy, in fact it’s nigh on impossible.

I had located a suggestion of setting up a claims that set all data to blank(), unfortunately this just didn’t seem to work for me, however it does seem to work for others. It may seem to come down to whether you turn on experimental features, I’m not sure – do you risk doing this on a support desk app and later Microsoft rips that feature out? I can’t risk it so will just have our team delete the person in SharePoint manually on those rare occasions we need it.

Microsoft really could do with improving support for complex field types within PowerApps, working with such fields is often said to be difficult and some recommend avoiding as result.

Patch > Success

I spent time today redeveloping our Support Desk app, and as I was doing so I stumbled upon someone’s suggestion for how to handle a successful patch event. In my previous post I mentioned one negative in not using Forms was losing the OnSuccess/OnFailure events and the facts these don’t exist outside of Forms.

Quite ingeniously, the person’s post I stumbled upon today suggested use of a collection to store result of a your patch command:

ClearCollect(colPatched, Patch(Comments, Defaults(Comments), {Comment: ThisItem.Comment}))

Thus, a successful patch command creates a collection with a row of data allowing us to develop our own OnSuccess/OnFailure via an If statement checking the number of rows.

When Forms makes no sense

When I developed our Support Desk app our screens were developed using Forms, these offer certain benefits I required, particularly with handling attachments uploads. However, once we’ve moved to managing of tickets use of forms wasn’t strictly necessary and actually has become a hindrance.

Why? When it comes to assigning a ticket to one of our team members the dropdown needed to refer to data in a separate SharePoint list, something forms just won’t let me do. Thus, I’m now creating a new ticket management screen, including adding some new functionality at the same time.

What spurred this latest iteration for the app was my desire to allow quick ticket assignment of a ticket from within the gallery, just click a person icon and it assigns to you. This worked, however when I would then open the ticket and perform a task (after refreshing the data) the data actually resets to what it was before I’d made the assignment – weird!

So, I decided to abandon use of forms and take control and thereby gain greater functionality. I now have the ability to control who we can assign tasks to, previously we had to search a combo box. The negative with losing forms is of course being able to leverage the OnSuccess and OnFailure events, these are so useful.

I’m adding to this iteration tabs and work notes. The tabs will help us reduce scrolling to see comments blocks, especially as were now adding another comment block, tabs can be used to control visibility and improve usability. Still much to do and test, but liking where this is going.

Survey choice

I’ve had little exposure to Microsoft Forms, most of my 365 apps exposure has centred around PowerApps, SharePoint, Power Automate and to a lesser extent PowerBi. One of the staff in our office coordinates professional development for researchers, research students and staff in general, so is now keen to automate her surveys rather than rely upon paper-based forms that require a lot of effort to record.

This week I began investigating whether Microsoft Forms might be our starting point, drawing from a SharePoint list of her workshops. Stumbling point one, Forms doesn’t support doing a drop list to allow users to choose which workshop they’re providing feedback on. Looks like I’ll be developing a custom PowerApp.

Importing the workshops

I had the devil of a time trying to import the list of workshops from a spreadsheet into SharePoint. In the past I had been able to use Internet Explorer which has Active X, however since last doing this that functionality seems to have been disabled via a Windows update. Thankfully, there is another option open to me within Excel using the Design tab to export to a SharePoint list, unfortunately this only works from Windows versions and not Mac, anything to make me boot that machine.

Once successfully extracted to my SharePoint list I set to task to test how I might take the data from my colleagues spreadsheet used to construct her workshops website. I had initially thought to use a combo box to have users select their course, but then decided a gallery was going to work far better, I could then provide the user with additional information as I could include the date they attended as well.

To assist the user I am going to include three ways to filter:

  • Year
  • Month
  • Text search

The first two are drop lists I have created two additional columns in the collection via AddColumns command and then leveraged the GroupBy command on each of these columns to build the lists, worked a treat. At the moment the list isn’t huge, only around 60-70 courses, however once the list grows these will become more important.

Once users have completed their surveys we’ll then be reporting upon their responses using PowerBi dashboards.

Day 2: App in a day

I’m now half way through Microsoft’s App in a day training program that takes us through the basics of developing in PowerApps, Power Automate and Common Data Service.

Yesterday, we developed a basic canvas app in PowerApps that sourced data from an Excel spreadsheet. I must check out their spreadsheet as it appears to contain photos, would never think to store photos within a spreadsheet.

Today, we were introduced to Common Data Service (CDS), a premium service required if you’re planning to develop model-driven applications. My first exposure to CDS, it was interesting but all too brief, you could spend so much longer sinking your teeth into this product. Tomorrow, our journey into CDS continues as we develop a model-driven app.

It’s clear some in this online version of the class may be struggling with the 2-hour per day format, I’ve actually managed to complete all roughly 15 minutes or so ahead of time both days due to my familiarity with PowerApps.

Under the heading “you get them in every class”, we had several twits this morning log into yesterday’s meeting. Just add our presenter got underway he was interrupted by someone to say the techno laggards were logged into the past 🤦🏼 In sure these are the same people who throughout the lesson who interrupt saying: they can’t log into the lab; can he provide yesterday’s files as they can’t download; will today’s file be provided; as well as anything else to interrupt.

Sadly, I learned yesterday PowerBi won’t be covered within this version of the course, a pity as I really wanted to learn more about this app; another course perhaps.