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 / How to add another Fil...
Power Apps
Answered

How to add another Filter option when you already have a Date Picker

(0) ShareShare
ReportReport
Posted on by 101

Hi All

 

I have a gallery in which i have already got a Date Picker that i am able to Filter by using the Formula in the Items in the gallery. 

If(IsBlank(DatePicker1.SelectedDate),'Harbour House Key History',Filter('Harbour House Key History', 'Date Out' = DatePicker1.SelectedDate))

 

I now want to add a Text input search function that will be able to filter on another column. also with the function that if the text input is blank i can see all results. 

 

Data Source: 'Harbour House Keys'

Column: 'Name in'

Text Input: TextInput1

 

Kind Regards

 

Justin 

 

Categories:
I have the same question (0)
  • TylerPA Profile Picture
    201 on at

    Try setting up your filter this way; should allow you to add more options as needed

     

    Filter(
    'Harbour House Key History',
    If(IsBlank(DatePicker1.SelectedDate), true, 'Date Out'=DatePicker1.SelectedDate),
    If(IsBlank(TextInput1), true, 'Name in'=TextInput1.Text)
    )
  • JEVANSAP Profile Picture
    101 on at

    Hi Thank you for your reply 

     

    I Tried this Formula and unfortunately this formula doesn't bring back any results for me in my gallery.  

    JEVANSAP_0-1668083376030.png

     

    I also got back a delegation warning on the date picker line. 

     

    Kind regards

    Justin

     

  • TylerPA Profile Picture
    201 on at

    Can you check if the column is 'Name in' vs 'Name In'?

     

    If you are trying to avoid delegation issues, I would recommend collecting the 'Harbour House Key History' during OnVisible

     

    Clear(collectHistory);

    Collect(collectHistory, 'Harbour House Key History');

     

    And then filter collectHistory, instead of the source

  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    Hi @JEVANSAP ,

    If 'Name in' is of type choice, then you can use - 

    Filter('Harbour House Keys', (IsBlank(DatePicker1.SelectedDate) || StartDate > DatePicker1.SelectedDate) And StartsWith('Name in'.Value, TextInput1.Text))

  • JEVANSAP Profile Picture
    101 on at

    I have added a collection as suggested 'CollectHistory' and done some testing on different variations of the formulas from the both of your reply's unfortunately these are still coming up with errors.

    I think i might have to do it differently, instead of filtering on both, maybe i could do it where i can either Search Via date or Via Name.  

     

    f(IsBlank(DatePicker1.SelectedDate),collectHistory,Filter('Harbour House Key History', 'Date Out' = DatePicker1.SelectedDate) Or Search(collectHistory,TextInput3.Text,"NameIn","NameOut"))

     

    This is the formula i came up with but whatever i change i still get the message: The Function Search 'Search' Has some invalid Arguments. 

  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    Hi @JEVANSAP ,

    Try using below formula - 

    If(IsBlank(DatePicker1.SelectedDate), collectHistory, Search(Filter('Harbour House Key History', 'Date Out' = DatePicker1.SelectedDate),TextInput3.Text,"NameIn","NameOut"))

  • JEVANSAP Profile Picture
    101 on at

    Hi @NandiniBhagya20 

     

    I tried this formula and it still dosnt work. If i just have the formula for the date picker it works, but as soon as i want to add the text search in i get red X everywhere. I think i might have to just have the date picker as my only filter function. 

     

    Kind Regards

     

    Justin

  • TylerPA Profile Picture
    201 on at

    Justin,

     

    We should be able to figure this out; taking a step back

    - What are the column types from your source for date, name?

    - If you just put the text input as your filter, no date - what's the error message?

     

    With the column types, I can try to build it out fully later

  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    Try removing the collection and directly use the list name as data source - 

    If(IsBlank(DatePicker1.SelectedDate), 'Harbour House Key History', Search(Filter('Harbour House Key History', 'Date Out' = DatePicker1.SelectedDate),TextInput3.Text,"NameIn","NameOut"))

  • JEVANSAP Profile Picture
    101 on at

    Hi @TylerPA 

     

    I tried this formula "Search(collectHistory,TextInput4.Text,"NameIn")" 

    JEVANSAP_0-1668092915522.png

    And instead of getting all the errors i am just getting it in that 1 column. ( i don't know why this is) 

     

    I am still getting this message: The Function Search 'Search' Has some invalid Arguments. 

     

    My Date Colum is a date picker and my Name in and Name out is a person Picker. 

     

    Thanks for looking into this 

     

    Justin

     

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 401 Most Valuable Professional

#2
11manish Profile Picture

11manish 201 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard