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

Community site session details

Session Id : /R+UxMhKuEWldyLCu8Uqtu
Power Apps - Building Power Apps
Answered

Filter gallery using Date Picker & Text box in Power-Apps

Like (0) ShareShare
ReportReport
Posted on 3 Feb 2021 16:36:19 by 6

Hi,

     I have been working on an app that I need to filter the gallery by using text box (search) and date picker (Start-date & End-date). 

 

Date-Picker:

Gkrish23_0-1612353114244.png

text-box:

Gkrish23_1-1612353171957.png

   Gallery Name: Feedback Info  - where it contains info such as Area,Created by, Floor Name, Location, Created (date) etc stored in share-point.

  

  Based on the text box values I want to filter the gallery at first, if in-case I want to narrow down further then need to use date range functionality. 

 

For ex:  Suppose If I type my name in text box then I will get all the info related to my name in gallery. If I want to check the specific time-period/date between November 2020 to December 2020 using date picker function, this is where I am not getting the exact result.

 

Code details are as follows for search text-box : (attached) and Date picker: (attached)

 

Please help assist on this query.

 

Thanks.

 

I have the same question (0)
  • Gkrish23 Profile Picture
    6 on 09 Feb 2021 at 11:02:34
    Re: Filter gallery using Date Picker & Text box in Power-Apps

    @nate_halliwell Thanks for the update. Now I have understood the logic behind the filter function.!!

     

    Kudos to the video as well..!!

  • Community Power Platform Member Profile Picture
    on 08 Feb 2021 at 18:42:43
    Re: Filter gallery using Date Picker & Text box in Power-Apps

    @Gkrish23 i recently made a video about this exact scenario, actually....  https://www.youtube.com/watch?v=0bRR-Zq407c

     

    essentially you'll need to nest the entire formula from my original post inside of an If(isBlank(CountryDropDown.Selected.Value), ......) formula.

  • Gkrish23 Profile Picture
    6 on 04 Feb 2021 at 14:16:49
    Re: Filter gallery using Date Picker & Text box in Power-Apps

    @Anonymous Thanks for the quick response. I am getting the expected results. 

    What if I want to add a drop-down box along with both Date-picker and search box?

     

    Drop-down box (Items) contain country locations such as India,Thailand etc. Based on the country wise I want to filter the same gallery along with both functions. In that case , what adjustments do we need to make in the code?

     

    Please assist on this..!!

  • Verified answer
    Community Power Platform Member Profile Picture
    on 03 Feb 2021 at 16:51:02
    Re: Filter gallery using Date Picker & Text box in Power-Apps

    try this:

     

    If(IsBlank(DatePicker_Start.SelectedDate),If(IsBlank(DatePicker_Start.SelectedDate),If(IsBlank(Searchbox.Text),FeedbackInfo,Filter(FeedbackInfo,Or(Searchbox.Text in Area, Searchbox.Text in Floor, Searchbox.Text in 'Created By'.DisplayName))),Filter(If(IsBlank(Searchbox.Text),FeedbackInfo,Filter(FeedbackInfo,Or(Searchbox.Text in Area, Searchbox.Text in Floor, Searchbox.Text in 'Created By'.DisplayName))),DaveValue(CreatedDate) >= DatePicker_Start.SelectedDate)),Filter(If(IsBlank(DatePicker_Start.SelectedDate),If(IsBlank(Searchbox.Text),FeedbackInfo,Filter(FeedbackInfo,Or(Searchbox.Text in Area, Searchbox.Text in Floor, Searchbox.Text in 'Created By'.DisplayName))),Filter(If(IsBlank(Searchbox.Text),FeedbackInfo,Filter(FeedbackInfo,Or(Searchbox.Text in Area, Searchbox.Text in Floor, Searchbox.Text in 'Created By'.DisplayName))),DaveValue(CreatedDate) >= DatePicker_Start.SelectedDate)),DaveValue(CreatedDate) <= DatePicker_End.SelectedDate))

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 752 Most Valuable Professional

#2
developerAJ Profile Picture

developerAJ 472

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 358 Super User 2025 Season 2

Last 30 days Overall leaderboard
Loading complete