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

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Modern Table and Selec...
Power Apps
Answered

Modern Table and SelectedItems not working

(2) ShareShare
ReportReport
Posted on by 46
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?
 
 
Categories:
I have the same question (0)
  • ronaldwalcott Profile Picture
    3,847 Moderator on at
    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
    5,072 Super User 2026 Season 1 on at
    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
    46 on at
    @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
    5,072 Super User 2026 Season 1 on at
    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
    5,777 Super User 2026 Season 1 on at
     
    Created a sample collection.
     
     
    Pass it to the Table Control
     
     
     
    Label Control
     
     
    Its getting updated 
     
  • FA-17040949-0 Profile Picture
    46 on at
    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
    1,191 Super User 2026 Season 1 on at
    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
    46 on at
    @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
    1,191 Super User 2026 Season 1 on at
    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
    1,191 Super User 2026 Season 1 on at
     
    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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 105 Most Valuable Professional

#2
Haque Profile Picture

Haque 77

#3
VASANTH KUMAR BALMADI Profile Picture

VASANTH KUMAR BALMADI 70

Last 30 days Overall leaderboard