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 Platform Community / Forums / Power Apps / Filter/Sort By Dropdow...
Power Apps
Unanswered

Filter/Sort By Dropdown Canvas

(0) ShareShare
ReportReport
Posted on by 91
Hello all, 
 
I've been searching for this solution for an hour and am at a mental gridlock. I need to pull codes from a column in the SharePoint list and filter a gallery by it. I'm currently back to "Incompatible types for comparison. These types can't be compared: Record, Record."
 
Current Code to filter gallery
 
Categories:
I have the same question (0)
  • Suggested answer
    CarlosFigueira Profile Picture
    on at
    Filter/Sort By Dropdown Canvas
    If 'ORG Code' is a choice or lookup column from SharePoint, then you need to compare the value, since they are represented as records:
    Filter(
      SortByColumns('CSM Tracking', "WeekEnd", SortOrder.Descending),
      'ORG Code'.Value = DropdownCanvas2.Selected.Value)
    Hope this helps!
  • zw2348 Profile Picture
    91 on at
    Filter/Sort By Dropdown Canvas
    Thanks for the reply, it didn't like it fully. 
     
     
  • CarlosFigueira Profile Picture
    on at
    Filter/Sort By Dropdown Canvas
    What is the type of the 'ORG Code' column from the SP list? Is it a choice / lookup column? Does it support multiple selections? Also, what is the Items property of the DropdownCanvas2?
  • zw2348 Profile Picture
    91 on at
    Filter/Sort By Dropdown Canvas
    I figured it out, and I appreciate your time and support! 
     
    For the Dropdown I had to use this code: 
     
    Table({Value: "All"}, Distinct('CSM Tracking', 'ORG Code'.Value))
     
    Then for the Gallery Items:
     
    SortByColumns(
        If(Dropdown2.Selected.Value = "All", 'CSM Tracking', Filter('CSM Tracking', 'ORG Code'.Value = Dropdown2.Selected.Value)),
        "WeekEnd",
        If(true, SortOrder.Descending, SortOrder.Ascending)
    )

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 836 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 231 Super User 2025 Season 2

Last 30 days Overall leaderboard