How to Use ThisItem in a Power Apps Gallery
Inside a gallery, each control in the template needs to show its own row's data. ThisItem is the row: ThisItem.Competency shows the Competency of whichever record that copy of the template is displaying.
Microsoft Power Apps Canvas Apps, Power Fx Formulas, and Controls
View All TagsInside a gallery, each control in the template needs to show its own row's data. ThisItem is the row: ThisItem.Competency shows the Competency of whichever record that copy of the template is displaying.
A gallery shows a list: one row per record, all with the same design. You design the first row, the template, and the gallery repeats it for every record. Here's how to add a vertical gallery, connect it to a SharePoint list and set it up properly.
A Back button should take people to wherever they came from. The Back function does exactly that, without a screen name: Power Apps remembers which screen was shown before, and returns to it.
A button that opens another screen needs one formula: Navigate, with the name of the screen. Put it in the button's OnSelect, and selecting the button changes the screen.
In a horizontal or vertical container, you can't drag a control to a new spot: the container places its controls one after another, in order. To move one, you change that order. Tree view's Reorder menu does it in two clicks.
When a second screen needs the same header as the first, you don't have to build it again. Copy the header container on one screen and paste it into the other: every control inside it comes along, with all its settings. You only rename the copies and change what's different.
Most canvas apps have more than one screen: a home screen, a list, a detail page. Adding one takes a couple of clicks in Power Apps Studio. The choice that matters is the layout, because some layouts come with controls already on them.
Focus isn't showing in the App checker means a control's focus border has a thickness of 0. Someone moving through the app with the keyboard can't see when they've landed on it. For anything they can tab to, give it a border; for a control they can't tab to, the border never appears anyway.
The App checker lists Missing tab stop under Accessibility errors: a control it considers interactive has no place in the keyboard's Tab order. For a gallery, the fix is TabIndex 0. For a plain heading, Microsoft's guidance points the other way, so think before you change it.
The App checker's Performance category shows Collection is initialized but never updated. A screen loads data into a collection and then only reads it. Collections are for data that changes in the app, so the checker suggests something lighter. Here's what it means and the two ways to fix it.