cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bhrigu12 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
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

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

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.

bhrigu12 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?

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

bhrigu12 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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Top Solution Authors
Top Kudoed Authors
Users online (7,762)