cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Abigailjw91
New Member

sort by and search

Hi

 

im trying to mix the following formulas to allow the templategallery to be searched but also sort by Title:

 

SortByColumns('Application Catalogue', "Title")

 

and

 

Search('Application Catalogue', SearchInput.Text, "Title")

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
CarlosFigueira
Power Apps
Power Apps

You can combine the two formulas. The first parameter of both Search and SortByColumns functions can either be a data source directly, or a result of a function that returns a table. In your case, you can use the following expression:

SortByColumns(
    Search('Application Catalogue', SearchInput.Text, "Title"),
    "Title")

 

View solution in original post

5 REPLIES 5
CarlosFigueira
Power Apps
Power Apps

You can combine the two formulas. The first parameter of both Search and SortByColumns functions can either be a data source directly, or a result of a function that returns a table. In your case, you can use the following expression:

SortByColumns(
    Search('Application Catalogue', SearchInput.Text, "Title"),
    "Title")

 

Thank you so much!

Anonymous
Not applicable

 

I attempted a similar process, but I get a message indicating:

 

"Suggestion: Part of this Search Formula cannot be evaluated remotely due to service limitations. The local evaluation may produce suboptimal or partial results. If possible, please simplify the formula. For more information, please see the search function documentation." 

 

And search doesn't work.I researched the https://docs.microsoft.com/en-us/powerapps/functions/function-filter-lookup and am not able to identify what it is that is missing.

 

Here is my query persay- SortByColumns(Search(Source,TextSearchBox1.Text,"Column"), "Column", If (SortDescending1,Descending, Ascending)

 

Bolded "Column" is the are in which if I hover over it the error message above displays.

 

 

Anonymous
Not applicable

I think I resolved my problem. Here is what I did:

 

SortByColumns(Filter(Source, TextSearchBox1.Text in Column), "Column", If(SortDescending1, Descending, Ascending))

 Used filter instead of search and "in" instead of "startswith"  
  

SMODH9
New Member

Items:

SortByColumns(Filter([@Equipment], StartsWith('Record Type', TextSearchBox1.Text)), "Modified", If(SortDescending1, Descending, Ascending))

This formula only work for sorting by date/time(modified) and want to use for search function option in gallery section.

What formula need to make where both sort and search work?

Helpful resources

Top Solution Authors
Top Kudoed Authors
Users online (4,515)