Skip to main content

Notifications

Community site session details

Community site session details

Session Id : tA7ABNwENAudclMRf+CzRX
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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 163 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 87

#3
stampcoin Profile Picture

stampcoin 73

Overall leaderboard
Loading started