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

Notifications

Announcements

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

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 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard