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 III
Super User III

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (92,752)