Skip to main content
Community site session details

Community site session details

Session Id : IkubigBQ8Js45lf7FdwwOi
Power Apps - Building Power Apps
Answered

Power Apps - Filter then Search

Like (0) ShareShare
ReportReport
Posted on 8 May 2024 16:27:43 by 17

I have a List that shows an Item Title, the Department it applies to, and an "Added" date field. (couple of other fields, but they display based on these three).

We don't want items that are older than 14 days to show.

We have a TextSearchBox that uses Search in the Gallery to be able to type in words, letters, partial strings, etc. and see the related item (for example, they type in "Youth" and they see the title "Youth Mental Health"; or they type in Health Services and see all items related to the Health Services department.

 

I've been scouring the web and these forums, but can't seem to find the right code to implement the filter first, then the search function. Do I need to try to implement the date range filter in the On Visible control for the screen, and then the Search in the Gallery? Or is there some way to implement a Filter('data source',Today()-14,Search('data source', Title, Deparment)?

 

Thanks.

  • DM-20081516-0 Profile Picture
    17 on 08 May 2024 at 19:35:12
    Re: Power Apps - Filter then Search

    Thank you, Imri-Ami Khan! Worked perfectly. Made me feel kinda stupid for not figuring that out on my own. 🙂

  • Verified answer
    Ami K Profile Picture
    15,665 Super User 2024 Season 1 on 08 May 2024 at 19:00:20
    Re: Power Apps - Filter then Search

    @Mercer - see the pattern below:

     

    Search(
     Filter(
     'Your Data',
     'Your Added Date Field' >= Today() - 14
     ),
     TextSearchBox.Text,
     Column1,
     Column2,
     Column3
    )

     

    Note that the Search function is not delegable, and neither is it delegable to use "Today() - 14"

  • DM-20081516-0 Profile Picture
    17 on 08 May 2024 at 18:40:29
    Re: Power Apps - Filter then Search

    Actually, it occurs to me that I could/should use the Created field rather than a new column that does basically the same thing....

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading started