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

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

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

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

 

Highlighted
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
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,521)