Power Apps Behavior when using the With function on the Items property of a gallery|Delegation is possible but not all items can be displayed

We investigated the behavior of the With function when used with the Items property (data source) of the Gallery in the Canvas application.

スポンサーリンク

What we want to check this time

As a preliminary step, set the app’s data row limit to 5,
Consider the behavior of the gallery when using SPO listings where there is a lot of data in the gallery within this application.
In this case, though, it is possible to write an expression that is not caught by the delegation in the gallery in the application, and thanks to the delayed loading feature of the gallery, all the items in the SPO list will be displayed,
If you enter an expression to which delegation is not applied, the delayed loading feature of the gallery does not work and only the items for the data row limit are displayed.

In this article, we will check the behaviour of this gallery when the With function is used for the Items property.

Case 1 : Assigning the result of a Filter to a variable of the With function

First, when assigning the result of the Filter to a variable that is declared in the With function and displayed in the gallery.

This is, of course, at the point of assigning to a variable, which can be delegated, but the data row limit is NG, so the display will look like the image.

So far, it is easy to understand.

Case 2: When the value used for the conditional expression of Filter is put into a variable of the With function

Then consider the case where the variable to be declared in the With function is assigned a value to be used in a Filter expression.

In this case, as shown in the image below, the behavior is also like this: delegation is done, but the data line limit is NG.

Case 3: Assigning a variable that is not used in any Filter expression in the With function

Finally, consider the case where the With function assigns a variable that is not related to the Filter expression at all.

Again, only the “data row limit” number of items will be displayed, as shown in the image.

The results so far show that using the With function for the Items property of the gallery will result in a behavior where the gallery’s delayed loading function will not work and only a limited number of items in the data rows can be displayed.

It is difficult to understand because there is no warning, but it is recommended to refrain from using the With function for galleries.

Extra: If you use variables declared in UpdateContext or Formulas, the delayed read function will work.

Declare variables in UpdateContext,
If this variable is used in a delegatable expression in the Items property of the gallery, all items will be displayed without problems.
The values declared in Formulas are also
Works without problems.

Related articles.

タイトルとURLをコピーしました