The issue arises because the Data Row Limit applies to local variables, while delegation allows more records when directly querying the data source. To solve this:
- Implement pagination using
FirstN and LastN functions.
- Store the results in a collection instead of a variable.
- Adjust the gallery’s
Items property to load the next set of 50 records when triggered by user interaction (like a button click). This allows manual control of how many records are displayed at once.
This method circumvents the 50-record limit and allows more efficient scrolling.
t formula to implement pagination with the FirstN and LastN functions, and using a collection instead of UpdateContext:
-
On the OnVisible property of the screen, initialize a collection:
ClearCollect(colSearchResult, FirstN(MovieTitles, 50))
-
On the OnSelect property of the Search button, update the collection with the next batch of 50 records:
ClearCollect(
colSearchResult,
Filter(
MovieTitles,
rxj_titletype in TypeCombobox.SelectedItems || CountRows(TypeCombobox.SelectedItems) = 0
)
);
Collect(
colSearchResult,
LastN(
Filter(
MovieTitles,
rxj_titletype in TypeCombobox.SelectedItems || CountRows(TypeCombobox.SelectedItems) = 0
),
50
)
)
-
Set the Items property of the gallery to:
colSearchResult
Please Closed the Question, Mark it Solved
If my answer helped resolve your issue, please consider marking it as solved to assist others facing the same problem. Additionally, giving it a like would be greatly appreciated and motivates us to keep helping
Thank You
Ravindra Jadhav
Please Subscribe to https://www.youtube.com/@jadhav_ravi_oo7
Connect On https://www.linkedin.com/in/ravindra-jadhav-powerplatform/