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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Gallery not showing ne...
Power Apps
Answered

Gallery not showing newly created items when using any sort of filter

(1) ShareShare
ReportReport
Posted on by 10
Took an access database and exported it into a SharePoint List. Created an App in powerapps and everything working as intended. I then create new entries in the power app and the sharepoint list gets updated. I create new entries from the sharepoint list and they get added. In my app, if sort the gallery by what im calling LOGNUMBER in descending order everything shows up. 
 
My issue is that I have a toggle that switches from "All Items" to "My Items" which looks at the person column in Sharepoint, "OMDRepp", and filters the view with 
Filter(export,Office365Users.UserProfileV2(User().Email).mail in OMDRepp.Email)
 
This will now only display items from the original access to sharepoint import, none of the new items created, whether from in app or on sharepoint list itself. The new items do show up if I only sort but do no filtering. An identical thing happens if i filter a "status" column for "Open". Results only for the original items and not the new items. 
 
On classic controls, I created the app and the sharepoint list, have full control access. Disabled the offline syncing. Cleared browser cache. Removed and re-added data. Published the app and just about anything else i have been suggested. Looking for any ideas. 
 
The sharepoint list is about 12k entries. all columns being filtered are indexed and search bar can currently search all items without issue. 
Categories:
I have the same question (0)
  • Suggested answer
    Assisted by AI
    Haque Profile Picture
    3,653 on at
    Dear @, Greetings from Haque! My apologies if this response doesn't bring you the right solution. 
     
     
    I am curious about the filter expressions, let's scrutinise the syntax: 
    Filter(export,Office365Users.UserProfileV2(User().Email).mail in OMDRepp.Email)

    Ah! To my best knowledge, the "IN" operator intend right side to be a table or at best a single-column table value and the left side to be a single value. If this is the case, we are close to arrest the problem. Apparently,  Office365Users.UserProfileV2(User().Email).mail returns a single email stringOMDRepp.Email should be a table or column of email strings to check if the user’s email exists in that list. If OMDRepp.Email is a single value or not a table/column, the "IN" operator will produce error or fail?

    One important area is if OMDRepp is a table, you need to extract the column Email as a single-column table, e.g., OMDRepp.Email returns a column, but sometimes you need to use ShowColumns or Distinct to get a proper table.

     

     

    Guard with ShowColumns function:

    Filter(export, Office365Users.UserProfileV2(User().Email).mail in ShowColumns(OMDRepp, "Email"))
     

    And if we want to be sure to get distinct email:

    Filter(export, Office365Users.UserProfileV2(User().Email).mail in Distinct(OMDRepp, Email).Result)

     

     

    I am sure some clues I tried to give. If these clues help to resolve the issue brought you by here, please don't forget to check the box Does this answer your question? At the same time, I am pretty sure you have liked the response!
     

    If you have one mintue:
    This is Shahidul Haque, I am pretty sure I have spent times on this issue to address the close resolution. To bring up a resolution for the betterment of the community users, these are the possible things I probably did:
    1. Read the issue carefully.
    2. Investigated and did RnD.
    3. Looked for a close match if the issue was previously posted or not.
    4. Took help from AI if my storehouse of knowledge failed.
    5. Spent time on taking screenshots (if it is/was needed).
    6. Revised the content before final posting.
    7. Finally, if it was a priority, I overthrown my personal task to provide a correct solution! 
     
    Why I did bring up these things? Everyone does these, right? Now let's change the lens. If you were me, what would you expect? A simple like
     
     

     

  • CU25021836-0 Profile Picture
    10 on at
    @Haque Neither of your suggestions helped and in fact gave me less results than what I originally had. I might be completely off base but the logic portion of what I have makes sense and works for a majority of my sharepoint list. 
     
     Below is another gallery filter I tried and had the same results. The filter works for all of the originally imported rows in the sharepoint list BUT the rows added after the sharepoint list was created, whether in the power app or from the list site itself, do not appear in any galleries that have any filter applied. 
     
    Filter(
        export,
        ComboBox1.Selected.Value in Enterprisee.Value)
     
     
    Example data - this is what the Sharepoint List would look like besides the last column
    Name OMDRepp Enterprisee imported or new
    Test Me USA imported
    Test2 You USA imported
    Test3 Me Other New
    Test4 You Other New
     
     
    Powerapp gallery for OMDRepp email filtered for "Me"
    Name OMDRepp Enterprisee imported or new
    Test Me USA imported
     
    Powerapp gallery for Enterprisee filtered for "USA"
    Name OMDRepp Enterprisee imported or new
    Test Me USA imported
    Test2 You USA imported
     
    Powerapp gallery with NO filter logic in Items
    Name OMDRepp Enterprisee imported or new
    Test Me USA imported
    Test2 You USA imported
    Test3 Me Other New
    Test4 You Other New
     
     
    Hopefully having some generic examples of what I'm seeing may help. 
     
  • WarrenBelz Profile Picture
    155,840 Most Valuable Professional on at
    Your issue is far more fundamental - the in filter is not Delegable with SharePoint. If OMDRepp is a single value Person field, then this is Delegable
    With(
       {_Mail: Office365Users.UserProfileV2(User().Email).mail},
       Filter(
          export,
          OMDRepp.Email = _Mail
       )
    )
    If it is multiple value, then there is no Delegable way of filtering on the entire dataset - you would need to use a Delegable "pre-filter" to get the target data set under your (500 - 2,000) Data Row Limit.
     
    Please ✅ Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like ♥
    Visit my blog
    Practical Power Apps    LinkedIn  
  • CU25021836-0 Profile Picture
    10 on at
    @WarrenBelz
     
    I am new to PowerApps and the power platform. What is meant by pre-filter the target data, I've seen this mentioned multiple times on the internet? Well, I understand what the statement is implying but I don't know from a practicality standpoint of how to implement. As of right now I just have a gallery that pulls the data and I was trying to process my filter in the Item field. I clearly do not grasp the delegable functions or how the interactions work but in my mind I don't understand the difference between pre-filter and filtering the data and where each occurs, if that makes any sense at all. 
     
    I know my OMDRepp cannot be an indexed column but my 'status' column is index but I am assuming it is still a delegation issue. 
  • Verified answer
    WarrenBelz Profile Picture
    155,840 Most Valuable Professional on at
    Firstly please have a read of this blog of mine (also this one may be useful in understanding Delegation). Indexing is a separate issue when the data set gets over 5,000 records.
     
    Essentially if you have another Delegable filter that will reduce the data set to under (maximum) 2,000 records, then you can use a non-Delegable filter on the result. As an example using your data and if you only wanted Enterprise of Other and there were less than 2,000 of these (and your Data Row Limit was increased to this), then you could use
    With(
       {
          _Mail: Office365Users.UserProfileV2(User().Email).mail,
          _Data:
          Filter(
             export,
             Enterprise= "Other"
          )
       },
       Filter(
          _Data,
          _Mail in OMDRepp.Email
       )
    )
    You are "pre-filtering" the data in the top statement - the List can be of any size as the filter is Delegable. The data set (limited to the first matching 2,000 records) is then returned and is processed on the local device, which is not subject to Delegation constraints.
     
    Please ✅ Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider answering Yes to Was this reply helpful? or give it a Like ♥
    Visit my blog
    Practical Power Apps    LinkedIn  

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard