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

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

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

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

CarlosFigueira
Power Apps
Power Apps

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.

3.jpg

The following error is shown (snapshot).

"WHICHCAMP" is dropdown based selection.

How can I correct the error?

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

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

 

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

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (60,716)