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 - Building Power Apps
Suggested answer

Missing Records when filtering a gallery

(0) ShareShare
ReportReport
Posted on by 20

I have a Power App that four controls connect back to a SharePoint List titled: Shopping Cart Ordered Items. These four controls connect back to three columns. Two date controls titled: dpFromDate_1 and dpToDate_1 connect back to date type column titled: Modified. A text input control titled: TxtSearchProduct_1 connect back to Single Line of Text column titled: Title. A dropdown control titled: drpCreatedBy_1 connects to a Person or Group type column titled: CreatedBy but SharePoint identifies the field as Author. This CreatedBy column is filled by when a User opens and save to this list via Office365Users, so no duplicates will exsist. This dropdown control in power apps does not contain a Value control. The screen ScnReport_1.OnVisible property contains this code: ClearCollect( colAuthors, Distinct( 'Shopping Cart Ordered Items', Author.DisplayName ) ); Set(varSelectedAuthor, "") The dropdown control DrpCreatedBy_1.Items property has this code: Sort(colAuthors, Value, SortOrder.Ascending) These controls filter a gallery titled: GalleryReportPDF and has an Items property of: Filter( 'Shopping Cart Ordered Items', // Date range filter (IsBlank(dpFromDate_1.SelectedDate) || Modified >= dpFromDate_1.SelectedDate) && (IsBlank(dpToDate_1.SelectedDate) || Modified <= dpToDate_1.SelectedDate) &&

// Product title search (delegation-friendly)
(IsBlank(TxtSearchProduct_1.Text) || StartsWith(Title, TxtSearchProduct_1.Text)) &&

// Author filter (Created By)
   (IsBlank(DrpCreatedBy_1.Selected) || Author.DisplayName = DrpCreatedBy_1.Selected.Value)

) When I use any of these controls to filter the data one row is always left out. How can I adjust these codes, so I see all of the data when filtered?

I have the same question (0)
  • WarrenBelz Profile Picture
    150,314 Most Valuable Professional on at
    Missing Records when filtering a gallery
    Just coming in briefly to give you some guidance on what @Michael E. Gernaey is talking about - your post would be far easier to deal with if it looked something like this-

    I have a Power App that four controls connect back to a SharePoint List titled:  'Shopping Cart Ordered Items'
    These four controls connect back to three columns. Two date controls titled: dpFromDate_1 and dpToDate_1 connect back to date type column titled: Modified
    A text input control titled: TxtSearchProduct_1 connect back to Single Line of Text column titled: Title
    A dropdown control titled: drpCreatedBy_1 connects to a Person or Group type column titled: CreatedBy but SharePoint identifies the field as Author. This CreatedBy column is filled by when a User opens and save to this list via Office365Users, so no duplicates will exist. This dropdown control in power apps does not contain a Value control. 
    The screen ScnReport_1.OnVisible property contains this code: 
    ClearCollect( 
       colAuthors, 
       Distinct( 
          'Shopping Cart Ordered Items', 
          Author.DisplayName 
       ) 
    ); 
    Set(
       varSelectedAuthor, 
       ""
    ) 
    The dropdown control DrpCreatedBy_1.Items property has this code: 
    Sort(
        colAuthors, 
        Value, 
        SortOrder.Ascending
    ) 
    These controls filter a gallery titled: GalleryReportPDF and has an Items property of: 
    Filter( 
       'Shopping Cart Ordered Items', 
       (
          IsBlank(dpFromDate_1.SelectedDate) || 
          Modified >= dpFromDate_1.SelectedDate
       ) && 
       (
          IsBlank(dpToDate_1.SelectedDate) || 
          Modified <= dpToDate_1.SelectedDate
       ) &&
       (
          IsBlank(TxtSearchProduct_1.Text) || 
          StartsWith(
             Title, 
             TxtSearchProduct_1.Text
          )
       ) &&
       (    
          IsBlank(DrpCreatedBy_1.Selected) || 
          Author.DisplayName = DrpCreatedBy_1.Selected.Value
       )
    ) 
    When I use any of these controls to filter the data one row is always left out. How can I adjust these codes, so I see all of the data when filtered?

    The only comment I have is that your filter should be Delegable, although 'Created By' being renamed to Author generally only happens in a Collection you make out of a List.
  • Arun K Rajan Profile Picture
    23 on at
    Missing Records when filtering a gallery
    Hi,
    Just try to remove the modified date filter and check.  and if still if you are facing issue please provide the details requested by @ so we get more information to support you.
     
    Regards,
    Arun
  • Suggested answer
    Michael E. Gernaey Profile Picture
    48,833 Super User 2025 Season 2 on at
    Missing Records when filtering a gallery
     
    Totally want to help you. Some feedback, its really hard to try to "read" your code, its always better to share pictures as a walkthrough so we can see what is going on. And any code that is broken, please also post the code so that we do not have to type it out :-). Lots of people accidentally take pictures of super long code hehe that we have to retype to try to help fix.
     
    oh hehe and some carriage returns please hehe, formatting makes it easier too :-)
     
    Ok now to your issue.
     
    For me :-( it's just too hard for me to follow it without seeing the app and have the code in the order that it executes etc.
     
    But you said one row is left out. Is it always the same row? And if so, can you identify the or share the specific data from that row, as it might give the reason why it doesn't get picked. Or are you saying its different (random) rows that do not show up?
     
    That would help a lot too
     
    So please share the code in order (use the code snippet so we can copy it too to try to help, its the second to last icon 
     
    And if you are willing to share the Data that is now showing up that will make it super-fast I believe as we will be able to see what is not showing up and we can compare that against your code, as well as against the data in the UI
     

    If these suggestions help resolve your issue, Please consider Marking the answer as such and also maybe a like.

    Thank you!
    Sincerely, Michael Gernaey
     

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…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 977 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 386 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 345

Last 30 days Overall leaderboard