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 / What is the order in w...
Power Apps
Unanswered

What is the order in which filter query output is returned?

(0) ShareShare
ReportReport
Posted on by

Hi Folks,

 

I'm trying to filter a collection and populate the result in a gallery. I have multiple filter conditions combined using an "OR" operator. For certain keywords it seems most relevant results are showing up on bottom rather than on top. In situations where multiple filter conditions are true, in which order do the results return and can we manipulate it somehow?

 

Example of my filter conditions:

Distinct(Filter(First(colSkills).value,Lower(First((Split(TextInput2_1.Text," "))).Result) in Lower(Title) ||
Lower(Left(TextInput2_1.Text,2)) in Lower(Left(Title,2)) ||
Lower(First( Split( Last( Split( TextInput2_1.Text,"/" ) ).Result, " " ) ).Result) in Lower(Title) ||
Lower(Last( Split( First( Split( TextInput2_1.Text,"/" ) ).Result, " " ) ).Result) in Lower(Title) ||
Lower(Trim(TextInput2_1.Text)) in Lower(Title)

,Title).Title, Title)

 

TextInput2 is the search bar. Please don't get confused by the usage of First(Col) as in my case the whole table is in the first index of collection.  

 

Kindly share your thoughts on filter query output order. 

Categories:
  • zmorek Profile Picture
    3,272 on at

    To change the sort order, either use Sort() or SortByColumns(). I think if no sort is applied, it defaults to sorting by ID? 

  • rbn_nue Profile Picture
    on at

    Hi @zmorek ,

     

    Thank you for the reply.

     

    The order I'm looking for here is based on the conditions which are true in the filters. In my case I have around 6 conditions in the filters. If the 3 of them are matched for set of values in the collection, in what order do they return? Is it based on first filter condition result first or random?

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard