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 / Filter and search at t...
Power Apps
Suggested Answer

Filter and search at the same time

(0) ShareShare
ReportReport
Posted on by 93
Hello, I have these two lines to put in a gallery items:
 
1:
Search( Sort( Sort(Delnik;Jmeno ); ID ); hledejDelnik.Text; Jmeno )
2:
Filter('Delnik';'Pracoviste' = dropPracoviste.Selected.Value)
 
I need to use them both, so I can put a dropdown filter first and then search through a results, byt they only works separate. Please help
Categories:
I have the same question (0)
  • Suggested answer
    RyanAutomates Profile Picture
    139 on at
    Hi there,
     
    It looks like you have 2 conditions and want to sort by name, then ID.
    Conditions:
    'Pracoviste' = dropPracoviste.Selected.Value
    - Jmeno contains hledejDelnik.Text
     
    Sorting order:
    by
    Jmeno ascending
    then by
    ID ascending
     
    If you nest your "Filter" within your "Sort"(s), you can achieve this:
     
    Sort(
        Filter(
            Delnik,
            'Pracoviste' = dropPracoviste.Selected.Value && 
            StartsWith(Jmeno, hledejDelnik.Text)
        ),
        Jmeno,
        ID
    )
    
    If you want to filter by your field Jmeno containing "hledejDelnik.Text", then you would need to use Search as well I think....so you'd have something like this:
     
    Sort(
        Search(
            Filter(
                Delnik,
                'Pracoviste' = dropPracoviste.Selected.Value
            ),
            hledejDelnik.Text,
            Jmeno
        ),
        Jmeno,
        ID
    )
     
    Hope this helps! :)
     

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