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

Search combo box not working with SharePoint data

Hi,

 

My built-in "Search" combo box (generated automatically by Power Apps) for an app, which has a SharePoint list as the source data, doesn't work properly. For instance, the SharePoint list has these 3 records:

 

ID   Name

1    This is a test

2    B

3    This is C

 

If my Search string is "test", the search result has 0 record. If my Search string is "this", the search result has 2 records.

If my Search string is "1", the search result has 0 record.

 

So, The built-in Search is only looking at the first word in the "Name" field. No other fields are being searched.

 

Did I miss something?

1 ACCEPTED SOLUTION

Accepted Solutions
gabibalaban
Level 8

Re: Search combo box not working with SharePoint data

The Items property for Gallery is:

 

SortByColumns(Filter([....], StartsWith(Title, TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending)) 

 

So,  the search results is expected to be as you described.

Of course, you can change StartsWith function with in operator, something like Title in TextSearchBox1.Text, but be aware that will give you a warning message as "in" operator is not delegable in SharePoint. 

For short, you can replace startswith with in to obtain the desired results only for Sharepoint lists with no more than 2000 records.

View solution in original post

1 REPLY 1
gabibalaban
Level 8

Re: Search combo box not working with SharePoint data

The Items property for Gallery is:

 

SortByColumns(Filter([....], StartsWith(Title, TextSearchBox1.Text)), "Title", If(SortDescending1, Descending, Ascending)) 

 

So,  the search results is expected to be as you described.

Of course, you can change StartsWith function with in operator, something like Title in TextSearchBox1.Text, but be aware that will give you a warning message as "in" operator is not delegable in SharePoint. 

For short, you can replace startswith with in to obtain the desired results only for Sharepoint lists with no more than 2000 records.

View solution in original post

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

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