cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
bhrigu12
Level: Powered On

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

PowerApps Staff CarlosFigueira
PowerApps Staff

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

PowerApps Staff CarlosFigueira
PowerApps Staff

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
Level: Powered On

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?

PowerApps Staff CarlosFigueira
PowerApps Staff

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
Level: Powered On

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

 

PowerApps Staff CarlosFigueira
PowerApps Staff

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
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 163 members 3,682 guests
Please welcome our newest community members: