cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sandyabegail
Frequent Visitor

Search and Sort by Name

Hi,

 

I have a gallery and would like the search option and sort to be based on the Names. I can't seem to figure out.

 

Here's how the gallery has been set up:

 

sandyabegail_0-1603292710440.png

sandyabegail_1-1603349873709.png

 

 

And here's the formula: SortByColumns(Filter([@ProdTrackerTest], StartsWith(Title, TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending)) Help please. Thank you!

 

 

 

4 REPLIES 4
WarrenBelz
Super User
Super User

Hi @sandyabegail ,

I am not entirely clear on this and Name is not a good title for a field, but are you after

SortByColumns(
   Filter(
      [@ProdTrackerTest], 
      StartsWith(
         Name, 
         TextSearchBox1.Text
      )
   ), 
   "Name", 
   If(
      SortDescending1, 
      Descending, 
      Ascending
   )
) 

 

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.

Unfortunately, this did not work. Or I'm doing it wrong.

 

To clarify,  I want the users of the app be able to search using the Display Name - which is the Body field of the gallery. 

 

Also, the gallery should show the most recent entries on top. 

@sandyabegail ,

The "Body" is not a field - the data is from the field Name (which you also should consider changing). If you want the most recent items on top

SortByColumns(
   Filter(
      [@ProdTrackerTest], 
      StartsWith(
         Name, 
         TextSearchBox1.Text
      )
   ), 
   "ID",  
   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.

Hi @sandyabegail ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

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.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (2,268)