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 / I need to add a search...
Power Apps
Unanswered

I need to add a search to this complicated filter

(0) ShareShare
ReportReport
Posted on by 39

So I think I have posted about this one before, it works but it's not optimal. Essentially, I have a Radio button that Says, "Filter Date" or "Show All Dates" and if "Filter Date" is selected then it basically activates the date picker. The user workflow is a sanitation department that schedules pickups on Wednesdays or Fridays, but they only schedule 15 pickups on each day, that's why I wanted to have a filter (with a count) where they can easily see how many have been scheduled on that given day. The formula is If(rdoDateSelect.Selected.Value="Filter Date", Filter('Bulk Item Pick Up', Date>=dteSearch.SelectedDate,Date <DateAdd(dteSearch.SelectedDate,1,Days)),'Bulk Item Pick Up')  I want them to be able to search the address using the IN filter that way they can search within the record and not what it starts with. What I have now is a completely separate gallery that I have a search set up. I can't figure out where to add the search within the current gallery control.

 

 

bm94_1-1672762900542.png

 

 

Categories:
  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @bm94

    With({_items: If(rdoDateSelect.Selected.Value="Filter Date", Filter('Bulk Item Pick Up', Date>=dteSearch.SelectedDate,Date <DateAdd(dteSearch.SelectedDate,1,Days)),'Bulk Item Pick Up') },

    Search (_items, Textinput1.Text, "address")

    ) 

  • bm94 Profile Picture
    39 on at

    @Drrickryp 

    Thanks for your reply! Unfortunately, using With( {_items: If(rdoDateSelect.Selected.Value="Filter Date", Filter('Bulk Item Pick Up', Date>=dteSearch.SelectedDate,Date <DateAdd(dteSearch.SelectedDate,1,Days)),'Bulk Item Pick Up') }, Search(_items, TextInput3.Text, "Address"))  does not work (I update the text input from your example). It says Address is not an actual field, which i know it is and it says the Search contains invalid arguments.. Any Idea?

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @bm94 

    See if Intellisense gives you a clue about the address field.  BTW, are you using SharePoint, Dataverse or something else?

  • bm94 Profile Picture
    39 on at

    @Drrickryp sharepoint list

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @bm94 ,

    Did the Address field have a different name that has been changed?

  • bm94 Profile Picture
    39 on at

    @Drrickryp 

     

    No, nothing has changed. Its almost like the filter isnt being added to the _items variable. So when I say Search(_items, it doesn't know what to do

  • Drrickryp Profile Picture
    Super User 2024 Season 1 on at

    @bm94 

    Before we get further, see if you get anything with 

    Search('Bulk Item Pick Up', TextInput3.Text,"Address") 

    and see if you get anything in the gallery.

  • bm94 Profile Picture
    39 on at

    @Drrickryp 

     

    So I got the original formula to work, but something weird is going on. Instead of my fields being First Name, Last Name, Address like they are in the sharepoint list, they are now showing up in Power Apps as Field_0, Field_1...... so Using Field_2 actually pulled in the address field and made the search work with the radio button filter. When I look at my gallery my labels are ThisItem.First, ThisItem.Last so Im not sure why everything changed to field_0 and so on

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 204 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard