Skip to main content

Notifications

Power Apps - Building Power Apps
Suggested answer

Filtering Collection Not Working

Like (0) ShareShare
ReportReport
Posted on 18 Dec 2024 13:26:59 by 20
Hello!
 
I have a collection that stores environments and a dataverse table that we update with the environments we want to display in our app. I was filtering the collection based on a filter in our dataverse table (see original code below). This has been working for over a year with absolutely no changes and then yesterday it stopped working. It does not show an error, it just shows blank instead of the environment name. The 'Environment Name' column is a single text field. It will work with another column called 'Environment ID' which is also a single text field. Not sure why it stopped working all of a sudden.
 
Filter(
        colAllEnvironmentsFriendly,
        FriendlyName in Filter(
                   'Environment Profile',
                   'Environment Type' = "DEV"
        ).'Environment Name'
)
 
Any help would be greatly appreciated!
Categories:
  • Nievechica24 Profile Picture
    Nievechica24 20 on 19 Dec 2024 at 13:33:52
    Filtering Collection Not Working
    abc123,
     
    It does create the collection correctly, but still shows blank when I try to filter the collection. I even tried using the schema name and nothing.
  • Nievechica24 Profile Picture
    Nievechica24 20 on 19 Dec 2024 at 13:26:10
    Filtering Collection Not Working
    Also I am the only user with access to edit the app and I have made no changes since March of this year.
  • Nievechica24 Profile Picture
    Nievechica24 20 on 19 Dec 2024 at 13:24:59
    Filtering Collection Not Working
    Thank you both for your responses. I tried both and neither worked. They do not error, it just does the same thing - blank entries. I tried switching the environment name for environment id and that works, but not showing the information that we want (showing id instead of the friendly name).
  • WarrenBelz Profile Picture
    WarrenBelz 143,867 on 18 Dec 2024 at 21:11:30
    Filtering Collection Not Working
    Another suggestion - separate the filters
    With(
       {
          _Names:
          Filter(
             'Environment Profile',
             'Environment Type' = "DEV"
            ).'Environment Name'
       },
       Filter(
          colAllEnvironmentsFriendly,
          FriendlyName in _Names.'Environment Name'
       )
    )
     
    Please click 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 giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    Buy me a coffee
  • Suggested answer
    abc 123 Profile Picture
    abc 123 655 on 18 Dec 2024 at 15:09:37
    Filtering Collection Not Working
    These are just suggestions to help you debug.
     
    First thing to check is that some pyschopath didn't modify any fiednames in the Table structures.
     
    Next, break down your current code to a second collection. Ensure that it's being populated as you expect. 
     
    ClearCollect(colProfileDEV,
            Filter(
                       'Environment Profile',
                       'Environment Type' = "DEV"
            ).'Environment Name'
    )
     
    Then, do the combo of collections to extract the data.
    Filter(
            colAllEnvironmentsFriendly,
            FriendlyName in colProfileDEV.'Environment Name'
    )

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #9 Get Recognized…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,867

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,161

Leaderboard
Loading started