Skip to main content

Notifications

Community site session details

Community site session details

Session Id : CmfL/7lWyskgfLi2cXsnb3
Power Apps - Building Power Apps
Suggested answer

Modern Table control filter issue.

Like (5) ShareShare
ReportReport
Posted on 18 Apr 2024 09:17:08 by 13

I am developing an internal application for my client using the latest Modern table control. I have encountered a strange issue where the Modern table control displays incorrectly after the data is filtered. It seems that it is not being refreshed correctly, but the row numbers below are displaying correctly. Please see the screenshot below.

 

TheodoreShi_0-1713431416464.png

 

The Modern table control is set to a flexible height. And I did some invetigation and found that as long as I set a fixed height for the Modern table control, this problem will not exist. Therefore, I guess this might be a bug. Anyone has any workaround to help me solve this problem, I would be very grateful.

  • Suggested answer
    Venkata Golla Profile Picture
    78 on 10 Nov 2024 at 23:24:04
    Modern Table control filter issue.
    I have the same issue.  This happens when you have more than a screen of data and scroll through data and change something in filters.
    To overcome, I am using a hidden timer control, a refresh button and a spinner for loading.

    Add Select(btnRefresh) where you are applying filters to.
     
    App:
    OnStart: Set(varRefresh, true);
     
    Table: Add varRefresh in the Filters
    Items: Filter(source, existing filters, varRefresh)
     
    btnRefresh:
    OnSelect: Set(varrefresh, false); UpdateContext({startTimer:true, varShowSpinner:true})
    Visible: true or false if you don't want a refresh button

    timer1:
    Duration: 500 (or less, as much delay as you want)
    OnTimerEnd: Set(varrefresh, true); UpdateContext({startTimer:false, varShowSpinner:false})
    Visible: false
     
    LoadingSpinner:
    Visible: varShowSpinner
    label: "Loading..."
     
     
  • Suggested answer
    Terra_Search_Ad Profile Picture
    7 on 05 Nov 2024 at 23:51:22
    Modern Table control filter issue.
    Solution:
    Reduce the height of the modern table control to under 715 or only allow the table to display up to 13 items on a screen. Anything over will bug the table and Filters wont update properly.
     
    The recently published authoring version 3.24103.17 and up introduced multi-select capabilities but broke the OnSelect Property of the table. When your list has more than 15 records, any records loaded after scrolling cant be registered with the OnSelect property such as Set(varSelectedRecord,Self.Selected) .
  • RS-10101839-0 Profile Picture
    2 on 10 Oct 2024 at 19:23:38
    Modern Table control filter issue.
    "I I'm having this issue too. My table is connected to a SharePoint list.  I'm using a Modern Tab List control with "My Requests", "Pending My Approval", "Admin View". Depending on what is selected, it will filter the table differently.  My table Items property is as follows:
     
    Switch(
    TabList_Dashboard.Selected.Value,
    "My Requests",
    // Filter when "My Requests" is selected
    Sort(
    Filter(
    'Event Budget Requests',
    And(
    Or(
    IsBlank(Txt_EventName.Value),
    StartsWith(
    'Event Name',
    Txt_EventName.Value
    )
    ),
    Or(
    DD_RequestStatus.Selected.Value = Blank(),
    'Request Status'.Value = DD_RequestStatus.Selected.Value
    ),
    Or(
    DD_StartDate.Selected.Value = Blank(),
    Year = DD_StartDate.Selected.Value
    ),
    'Created By'.DisplayName = varUser.FullName // Filter by current user
    )
    ),
    Modified,
    SortOrder.Descending
    ),
    "Pending My Approval",
    // Filter when "Pending My Approval" is selected
    Sort(
    Filter(
    'Event Budget Requests',
    And(
    Or(
    IsBlank(Txt_EventName.Value),
    StartsWith(
    'Event Name',
    Txt_EventName.Value
    )
    ),
    Or(
    DD_RequestStatus.Selected.Value = Blank(),
    'Request Status'.Value = DD_RequestStatus.Selected.Value
    ),
    Or(
    DD_StartDate.Selected.Value = Blank(),
    Year = DD_StartDate.Selected.Value
    ),
    'Current Approver'.DisplayName = varUser.FullName // Filter by current approver
    )
    ),
    Modified,
    SortOrder.Descending
    ),
    "Admin View",
    // Filter when "Admin View" is selected
    Sort(
    Filter(
    'Event Budget Requests',
    And(
    Or(
    IsBlank(Txt_EventName.Value),
    StartsWith(
    'Event Name',
    Txt_EventName.Value
    )
    ),
    Or(
    DD_RequestStatus.Selected.Value = Blank(),
    'Request Status'.Value = DD_RequestStatus.Selected.Value
    ),
    Or(
    DD_StartDate.Selected.Value = Blank(),
    Year = DD_StartDate.Selected.Value
    )
    )
    ),
    Modified,
    SortOrder.Descending
    )
    )
     
     
    Before I added the tab list control, I just had one view for the table.  The Items property was set to:
     

    Sort(

     

        Filter(

     

            'Event Budget Requests',

     

            And(

     

                Or(

     

                    IsBlank(Txt_EventName.Value),

     

                    StartsWith(

     

                        'Event Name',

     

                        Txt_EventName.Value

     

                    )

     

                ),

     

                Or(

     

                    DD_RequestStatus.Selected.Value = Blank(),

     

                    'Request Status'.Value = DD_RequestStatus.Selected.Value

     

                ),

     

                Or(

     

                    DD_StartDate.Selected.Value = Blank(),

     

                    Year = DD_StartDate.Selected.Value

     

                )

     

            )

     

        ),

     

        Modified,

     

        SortOrder.Descending

     

    )

     

     

    This was working well with my filter controls.  It was when I added the Tab list control and the Switch statement when things stopped working correctly.  I tried it as an If statement and had the same bugs as Switch statement.  I think my code is good but this new table control is buggy as heck.

     

    I tried adding the "Navigate(to another screen)" to the OnChange property of all the controls and it seemed to help in Preview but when I published the app, it did not help at all.

  • Suggested answer
    SN-26091517-0 Profile Picture
    4 on 26 Sep 2024 at 16:45:30
    Modern Table control filter issue.
    Another workaround:
    - adding a button
    - and [OnSelect] event, add 2 screen navigations:
    Navigate(to another screen); Navigate(back to the current screen);
     
    This works for me.
     
  • Suggested answer
    SN-26091517-0 Profile Picture
    4 on 26 Sep 2024 at 15:22:58
    Modern Table control filter issue.
    Just a workaround: 
    add "Navigate(App.ActiveScreen)" to the OnChange event of the dropdown filter to refresh the screen.
  • Suggested answer
    ppatterson Profile Picture
    14 on 21 Aug 2024 at 16:52:03
    Modern Table control filter issue.
    Stupid pet trick time... but it seemed to work on a large data set.
     
    Add a timer:
    • Start will be a variable such as "startMyTimer"
    • In the app, initialize this to false ... Set(startMyTimer,false);
    • Duration at least one second (1000)
    • OnTimerStart... set your value to "bogus"... unless bogus can be a real value, of course. Set( zSearchField, "bogus")
    • OnTimerEnd... set your value to what you really want to use... Set( zSearchField, "real data")
    • OnTimerEnd... also reset your timer start back to false
    • In the field that changes, set the on change to start the timer.  Set(startMyTimer,true);
    If you have a reset button to show all you'll need to set the timer there, too.
     
    It really did work... and yes, it is absolutely insane this needed to be done!
  • FedericoC Profile Picture
    48 on 19 Aug 2024 at 19:04:08
    Modern Table control filter issue.
    Anyone could find a solution to this?
  • ArturoDeLaRosa Profile Picture
    5 on 10 Jul 2024 at 12:19:55
    Re: Modern Table control filter issue.

    I found the same bug with Modern Table and SQL Server as Datasource.

     

    The only workaround I found is create a button to refresh the datasource and use boolean variable to filter the table.

    The user have to press this buttom x2 to view the data properly.

     

    UpdateContext({_locFilterCons:false}); UpdateContext({_locFilterCons:true});
    Refresh(tblSource);
  • Thomas-4711 Profile Picture
    4 on 19 Jun 2024 at 14:27:56
    Re: Modern Table control filter issue.

    Hello everyone,
    the workaround doesn't work for me. I've tried it with TabList, DropDown and ComboBox. The Sharepoint list only has 46 entries. If I filter the first part and then scroll in the table, the table is not updated when the filter is changed, the old records remain visible. Only the counter is updated.

    TabList/ComboBox/DropDown - OnChange: 

    Refresh(SharepointList)
    Table Items:
    Filter(SharepointList; Department = TabList_DepartmentSelected.Value)
    Are there other options here? I don't want to switch to the old table or a gallery.
    thank you very much
    kind regards
    Thomas
  • Ape Awakening Profile Picture
    295 on 30 Apr 2024 at 09:27:44
    Re: Modern Table control filter issue.

    I faced same issue filtering on modern table control which has sharepoint datasource , row count show some value and table show all list items,
    Workaround I had and it works perfectly.
    Workaround : 
    In filter function if you're using dropdown or combo box , OnChange property : Refresh(SharepointDataSource).
    Still there will be issue with inputtext filter : Again change that inputtext to combobox

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,769 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,091 Most Valuable Professional

Leaderboard
Loading started