Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Experimental Features
Answered

Modern Table and SelectedItems not working

(1) ShareShare
ReportReport
Posted on by 44
I have two modern tables in my Screen. OpenInvoices and "AllInvoices". They are visible if they are chosen in Toolbar.
 
I have an issue with SelectedItems. It seems SelectedItems is not working for this table?
 
 
  • Verified answer
    FA-17040949-0 Profile Picture
    44 on at
    Modern Table and SelectedItems not working
    Thanks for checking in :)
     
    The original issue presists, I had to implement a workaround with a paginated report instead. 
    The "List" view in modern table shows the data by default as paginated with 25 records. So I did the same for the table view. The collection shows 25 records at a time and by limiting the view to 25 records at a time, all aspects of selection. selecteditems etc works perfectly.
     
    So if Microsoft can't fix this, they should implement automatic pagination for Gridview as well.
  • venturemavenwil Profile Picture
    600 Super User 2025 Season 1 on at
    Modern Table and SelectedItems not working
     
    just checking in. Have you managed to solve this problem?
  • Suggested answer
    venturemavenwil Profile Picture
    600 Super User 2025 Season 1 on at
    Modern Table and SelectedItems not working
    Could you change all instances of CountRows to CountIf(<collection>, true)? That is one reported problem - CountRows doesn't always update live. 
  • FA-17040949-0 Profile Picture
    44 on at
    Modern Table and SelectedItems not working
    @venturemavenwil I have simplified my table to only be one table, and toggled the view to show All or only open. I have added a gif showing what happens.

    When you start selecting, The "Fakturakopi ()" counter works fine. When you start browsing, the counter goes to 0.
    But at the bottom of the table it shows the correct selected item numbers. 
    When clicking the button "Fakturakopi" the collection is either blank or only the items that sometimes are shown as selected.
     
    Maybe i have to change the table onSelect code to add to collection as an item is clicked as a workaround?
    Update: Tested, not working. The OnSelect triggers only "sometimes", not all the time.
     
     
    SortByColumns(
        Filter(
            Invoices;
            If(varShowOpenOnly; Status = "Open"; true);
            varReset
        );
        "Dato";
        SortOrder.Descending
    )
    For the Toolbar "OnSelect", i changed it to:
    "send_email";
      ClearCollect(varSelectedInvoices;
        ForAll(OpenInvoices.SelectedItems;Faktura));;
    The code to count how many i have selected is:
        {
            ItemKey: "send_email";
            ItemDisplayName: "Fakturakopi (" & CountRows(OpenInvoices.SelectedItems) & ")";
            ItemIconName: "Mail";
            ItemAppearance: "Subtle";
            ItemIconStyle: "Regular"
        };
  • Suggested answer
    venturemavenwil Profile Picture
    600 Super User 2025 Season 1 on at
    Modern Table and SelectedItems not working
    I believe there are two problems that showed up here. 
     
    In the first example, I am guessing you are trying to collect a value in a specific column? If so, then consider the following PowerFx instead
     
    ClearCollect(
        varSelectedInvoices
        ForAll(OpenInvoices.SelectedItems, Faktura);
        ForAll(AllInvoices.SelectedItems, Faktura)
    );;
     As for the CountRows, Microsoft has reported that the function doesn't work well for collections that update live. Try to use this PowerFx instead.
     
    CountIf(OpenInvoices.SelectedItems, true)
    CountIf(AllInvoices.SelectedItems, true)
    Let me know if you have a more accurate result with these modifications. 
  • FA-17040949-0 Profile Picture
    44 on at
    Modern Table and SelectedItems not working
    I can select items, and it counts with countrows (selectedItems), but if you then scroll down to select more, then the selection shows zero.
  • MS.Ragavendar Profile Picture
    1,597 on at
    Modern Table and SelectedItems not working
     
    Created a sample collection.
     
     
    Pass it to the Table Control
     
     
     
    Label Control
     
     
    Its getting updated 
     
  • stampcoin Profile Picture
    676 on at
    Modern Table and SelectedItems not working
    It might be a bug. I will try to load a volume data and do some test, will let you know.
     
  • FA-17040949-0 Profile Picture
    44 on at
    Modern Table and SelectedItems not working
    @stampcoin I searched the web and fount out that if I reduce the table height to approx 672 so it maximum shows 14 items, and turn of flexible height for the modern table, then it works, but only if I do not scroll.
     
    My table has approx 400 items. When table is refreshed, i can click on items, and selecteditems count works. Once I scroll, selecteditems is set to 0 again.
     
  • stampcoin Profile Picture
    676 on at
    Modern Table and SelectedItems not working
    I did one , it works for me. have you tried save it and re run it ? what about collection ?  Might be some new feature cause it ? 
     

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,660 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard

Featured topics