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 / sort and filter in a t...
Power Apps
Answered

sort and filter in a teams app

(0) ShareShare
ReportReport
Posted on by

This problem is specific for Powerapps for Teams.

 

I am having some trouble with filtering my gallery view, based on two input; a text search and a drop down menu.

This is the code I am using in the Items property of the gallery:

 

Sort(
 Filter(
 Prøvegjennomgang_lab, //my data source
 Lokalitet.Value = varProsjekt, //this is an attribute that is filtered before entering the screen with the gallery, it works just fine
 StartsWith(IntrasisID, 'Søk prøver'.Value), //this is the text search, works just fine
 IsBlank(PrøvetypeFilter.Selected) || Prøvetype.Value = PrøvetypeFilter.Selected // this is the problem, where Prøvetype is a Choice column, and the PrøvetypeFilter is a dropdown menu
 ),
 IntrasisID,
 SortOrder.Ascending
)

 

I keep getting the error "Incompatible types for comparison" in Prøvetype.Value = PrøvetypeFilter.Selected, but there is no option to add .Value to Selected, only SelectedItems, which also throws the same error.

 

Is there something I am missing completely? 

Categories:
I have the same question (0)
  • Verified answer
    CU12090750-0 Profile Picture
    on at

    So it turned out I had missed something completely. The choices in PrøvetypeFilter came from a collection. I had the Item property for the filter set to nameofcollection.Result rather than .Value. After changing it I could use .Selected.Value in my filter. 

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 335 Most Valuable Professional

#2
11manish Profile Picture

11manish 166

#3
sannavajjala87 Profile Picture

sannavajjala87 71 Super User 2026 Season 1

Last 30 days Overall leaderboard