cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate III
Advocate III

PowerApps - Combining Sort and Search Functions

Hi,

 

I have created one powerapp for our departmental use. The following screenshot gives detail of layout were used with datasource from Sharepoint:

1.jpg 

 

The following formula was used in item property of Gallery. Kindly help!

 

2.jpg 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Super User III
Super User III

Re: PowerApps - Combining Sort and Search Functions

The Search function is not delegatable in Sharepoint and will throw an error message.  The usual way to handle this in Sharepoint is to replace the Search function with a combination of Filter() and StartsWith(), both of which are delegatable:

 

SortByColumns(Filter('AMS_DETAILS (FY-19)',StartsWith("WHICHCAMP",TextSearchBox1.Text),"started", If(SortDescending1, Descending,Ascending)).

 

 

 

View solution in original post

Highlighted
Power Apps
Power Apps

Re: PowerApps - Combining Sort and Search Functions

What is the type of the column "WHICHCAMP"? Based on the error message, it is not of type text - and the Search function only works for text columns.

 

You can change this to a Filter function, which works with other column types, something along the lines of

Filter('AMS DETAILS (FY-19)', TextSearchBox1.Text in WHICHCAMP)

View solution in original post

6 REPLIES 6
Highlighted
Super User III
Super User III

Re: PowerApps - Combining Sort and Search Functions

The Search function is not delegatable in Sharepoint and will throw an error message.  The usual way to handle this in Sharepoint is to replace the Search function with a combination of Filter() and StartsWith(), both of which are delegatable:

 

SortByColumns(Filter('AMS_DETAILS (FY-19)',StartsWith("WHICHCAMP",TextSearchBox1.Text),"started", If(SortDescending1, Descending,Ascending)).

 

 

 

View solution in original post

Highlighted
Power Apps
Power Apps

Re: PowerApps - Combining Sort and Search Functions

If you hover the mouse on the word that is underlined by a bold squiggly line ('WHICHCAMP'), it should show a tooltip that gives you more information about the error. Can you see if you can find it and post it here? That will help us to find out what is wrong with your expression.

Highlighted
Advocate III
Advocate III

Re: PowerApps - Combining Sort and Search Functions

3.jpg

The following error is shown (snapshot).

"WHICHCAMP" is dropdown based selection.

How can I correct the error?

Highlighted
Power Apps
Power Apps

Re: PowerApps - Combining Sort and Search Functions

What is the type of the column "WHICHCAMP"? Based on the error message, it is not of type text - and the Search function only works for text columns.

 

You can change this to a Filter function, which works with other column types, something along the lines of

Filter('AMS DETAILS (FY-19)', TextSearchBox1.Text in WHICHCAMP)

View solution in original post

Highlighted
Advocate III
Advocate III

Re: PowerApps - Combining Sort and Search Functions

The problem is solved....!!

 

Thanx Carlos and Drrickyp for your time and help..!!!

 

M getting the following warning... Should I be concern about it ???

 

4.jpg

 

Power Apps
Power Apps

Re: PowerApps - Combining Sort and Search Functions

It means that the filtering will be done with the data that is downloaded by the client, and not done in the server. If your SPO list has 500 items or less (or 2000, if you increase the value in the app settings), then you will not have a problem.

 

Take a look at https://docs.microsoft.com/powerapps/maker/canvas-apps/delegation-overview for more information on delegation.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,755)