Getting started with PowerApps can be difficult,adding controls to screen is quite easy and quite quickly you may end up with an app that does the job. The question however is cold you have developed things quicker? Or could you have developed things better?
In this post I’m going to have a look at galleries in PowerApps.
Service Desk Template
Very often Microsoft people will tell you to get started with Templates. I tend to go the other way and I start with an empty canvas app. Templates do have their uses though. Personally I only use them for training purposes. I’m going to start with the Service desk template.
How many galleries can you find in the screenshot above?
Microsoft’s template team only used 2 galleries in the above screen! The menu on the left hand side is a gallery and the data displayed right of the menu is a gallery. Is this the right number?
Time to start looking at what a gallery is.
Within PowerApps a gallery is a list of elements which show a similar behaviour
I took the same screenshot again and considered where galleries could have been used. There are two areas that should be considered to be galleries. At the top there are the numbers (All tickets, New Ticket etc). These are elements split across the screen that could have been implemented with a gallery.
Within the ticket overview there is also an option to create a gallery for the heading of each ticket, showing Ticket Id, Created By, Priority and Created date.
I want to have a look at one more example. This time I’m using the Calendar screen template.
Looking at the above screenshot of the calendar, I’ve found that Microsoft has done a great job looking at the Galleries within the solution.
The following Galleries have been created:
- List of events on the right
- A list of days in a month
- A list of week days (Sun – Sat)
So far all of the galleries have been displaying data from the items represented in the gallery.
The tutorial screen template gives another great example of using galleries.
Can you identify the gallery?
This screen will let you walk through a number of items and the text on the right will change as you click on the next item. The item indicators follow by highlighting the 1st, 2nd, 3rd or 4th circle in the indicator. These circles do no display any of the data from the items displayed. This item indicator will simply show which of the items is selected.
The concept of galleries is very important in PowerApps. It is the difference between developing an app and developing a great app. Galleries help you display an unknown number of items in a consistent manner without having to worry about making the items fit as much as you would do if you created the same with separate controls.