web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filtering the dataset ...
Power Apps
Unanswered

Filtering the dataset and then applying Pagination for modern tables

(0) ShareShare
ReportReport
Posted on by 25
Hi Team,
 
I need your support in the below use case - I have a responsive screen in powerapps where I am using two modern table cotrols in a single container. I built a scroller outside the container to move up and down 10 records at a time. 
Both these tables are connected to the same dataset. I have used the same items property in table 5 and table 6. 
Table 5 acts as a freeze pane with couple of columns added to this table and Table 6 has other set of columns. I need both these tables to scroll with a single scroller and interact with each other whenever it is filtered.

When using the scroller withour applying any filters it all works well. 

However, when I apply filters based on the Country selected from the dropdown list, if the country is not available on the current page of the tables, it gives blank records. 

I want to apply the pagination for the modern table in PowerApps dynamically on the size of the filtered dataset (Selection of a country). i.e. after the country filter is applied and not before that. 

Currently the table is applying pagination (VarCurrentScroll and VarNextScroll) before filtering the collection for the selected country and scroll logic needs to be applied after filtering the entire collection.

If no selection it should show all records as per the pagination control.

The Record_No is tied to the unfiltered dataset (ColLocalMasterSPList), so when I filter for a country, its relevant record might not fall within the currently paginated range (VarCurrentScroll and VarNextScroll) which then gives a blank record page.

 
On Select property for both the tables is 
VolumeTable_5.SelectedItems
 

Item property of the modern table:

With({

       FilteredCollection: Filter(

       ColLocalMasterSPList,

       IsBlank(drpFilterCountry.Selected.Country.Value) || 

       Country.Value = drpFilterCountry.Selected.Country.Value

       )},

   Filter(

       FilteredCollection,

       CountRows(Filter(FilteredCollection, Record_No <= VarNextScroll)) > VarCurrentScroll

   ))

Next Button Logic:

Set(VarCurrentScroll, Min(VarCurrentScroll + 10, CountRows(FilteredCollection)));

Set(VarNextScroll, Min(VarNextScroll + 11, CountRows(FilteredCollection)));

Previous Button Logic:

Set(VarCurrentScroll, Max(VarCurrentScroll - 10, 0));

Set(VarNextScroll, Max(VarNextScroll - 10, 10));

Categories:
I have the same question (0)
  • mmbr1606 Profile Picture
    14,605 Super User 2025 Season 2 on at
    hey
     
     
    my suggestion is not to use modern controls as of now, they are still in preview and in my and others point of view not here to be used in productive apps
     
    please do urself a treat and stick to the classic ones for now, there is no solution to buggy modern controls
     
     
    if my answer helped please mark it as verified,
     
     
    cheers

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard