cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

Search Box in Gallery

Hello,

I have a gallery that is sorted and filtered. You can see the code below.

Now I would like to make a search field as in the picture.

Screenshot (9).png

how can i implement this and combine it with the existing code?

Sort(
   Filter(
      YourDataList,
      YourDateField >= Today() && YourDateField <= Today()+14
   ),
   YourDateField,
   Descending
)

if I put a semicolon after the code and then write    Search(data source; searchbox.text; "name"), I get an error

Thank you 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Hi @Alice87 ,

Apart from name not being a good title for a field (it is a Reserved Work in Power Apps, you could try this

Sort(
   Filter(
      YourDataList,
      YourDateField >= Today() && 
      YourDateField <= Today()+14 &&
      searchbox.text in name
   ),
   YourDateField,
   Descending
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

4 REPLIES 4
Super User III
Super User III

Hi @Alice87 ,

Apart from name not being a good title for a field (it is a Reserved Work in Power Apps, you could try this

Sort(
   Filter(
      YourDataList,
      YourDateField >= Today() && 
      YourDateField <= Today()+14 &&
      searchbox.text in name
   ),
   YourDateField,
   Descending
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

@WarrenBelz  unfortunately that didn't help me .. it doesn't work.

Hi @Alice87 ,

That is valid code (other than a capital T required in Text) providing your list names and field names are valid. You will get a Delegation warning as neither Dates or in are Delegable (nor is Search). What is not working?

@WarrenBelz  Thanks, I misspelled, it works

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (9,850)