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

Community site session details

Session Id :
Power Apps - Power Apps Experimental Features
Answered

Modern Table and SelectedItems not working

(2) 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?
 
 
I have the same question (0)
  • ronaldwalcott Profile Picture
    3,827 Super User 2025 Season 2 on at
    Modern Table and SelectedItems not working
    You have not explained the problem that you are getting what is the structure of the collection?
    Besides that the modern table is still in preview and may not be fully functional.
  • stampcoin Profile Picture
    4,428 Super User 2025 Season 2 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 ? 
     
  • 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
    4,428 Super User 2025 Season 2 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.
     
  • MS.Ragavendar Profile Picture
    4,248 Super User 2025 Season 2 on at
    Modern Table and SelectedItems not working
     
    Created a sample collection.
     
     
    Pass it to the Table Control
     
     
     
    Label Control
     
     
    Its getting updated 
     
  • 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.
  • Suggested answer
    venturemavenwill Profile Picture
    931 Super User 2025 Season 2 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
    @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
    venturemavenwill Profile Picture
    931 Super User 2025 Season 2 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. 
  • venturemavenwill Profile Picture
    931 Super User 2025 Season 2 on at
    Modern Table and SelectedItems not working
     
    just checking in. Have you managed to solve this problem?

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Power Apps

Last 30 days Overall leaderboard

Featured topics