How to Combine Conditions in Power Apps with And and Or
Most real conditions have more than one part: this job title and still active, not loading and nothing to show. And is true only when all parts are true; Or is true when any part is.
Most real conditions have more than one part: this job title and still active, not loading and nothing to show. And is true only when all parts are true; Or is true when any part is.
When a Power Apps formula filters a SharePoint list, there are two ways it can run. Either SharePoint does the filtering and sends back only the matching items, or Power Apps downloads some items and filters them itself. The first is delegation, and it's the only way that works on a big list.
Formulas often need a property of the control they're on, or of the control that holds it. Self is the current control and Parent is its container, so you don't have to type control names, and the formula still works when you copy the control or rename it.
An empty gallery is just blank space: people can't tell whether the app is broken, still loading, or has nothing to show. Put a message in its place that says why it's empty, and what happens next.
While a screen loads its data, show that something is happening. The modern Spinner control is a spinning ring with an optional label; make it visible only while a loading variable is true.
A screen's OnVisible property runs each time the screen is shown. It's the place to load what that screen needs and to set its starting values, instead of loading everything when the app starts.
Formulas joined with ; run one after the other: the second request waits for the first. When two loads don't depend on each other, Concurrent starts them together, so the screen waits only as long as the slowest one.
A context variable holds a value for one screen: whether something is loading, which item is selected, a table of rows. UpdateContext creates it or changes it. Other formulas on the screen then use it by name, and recalculate when it changes.
A collection is a table that your app keeps in memory and can change: add rows, remove them, edit them. ClearCollect empties a collection and fills it again in one step, which makes it the usual way to load data into one.
Functions such as Filter, AddColumns and ForAll work through a table one record at a time, and inside them ThisRecord is the current record. Put one of those functions inside another, and ThisRecord means the inner one only. As gives a record its own name, so you can reach it from anywhere in the formula.