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.
Low-Code and No-Code Development Platforms
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.
The Career Development Plan app gets its first screen. When someone opens the app, the Home screen greets them by name and shows their job title and manager. Everyone sees a My plan button, and managers also see My team. Behind it are the app's named formulas, which every later screen reuses.
Max returns the largest of its numbers. Give it a list of values, or a table and a column, and it hands back the biggest. Beyond the obvious uses, like the latest score or the highest amount, it's handy for layouts: "make this as tall as whichever of these is tallest".
Not flips a true-or-false value: true becomes false, false becomes true. You'll use it constantly with checks like IsEmpty and IsBlank, which answer the opposite of the question you usually want to ask. Power Fx lets you write it as a function, Not(...), or as the ! operator.