cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper III
Helper III

Search to Include Text with Space

Hi I'm trying use the search function on SharePoint, I have column as Full Name instead of separate columns as First and Last Name. Issue is search is not retrieving if I search by Last Name.  No issue if I search by First Name. So is there a way to include the full text of a record with search. I don't want to have separate Fields

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @indhaa 

It will only search the first 2000 items in the list. To search the newest 2000 records, Sort the list by ID in descending order first. SharePoint assigns an ID to every record in the order in which the record is created.  Delegation in SharePoint will only work for StartsWith().  If you separate the names, you will be able to search any number of records with StartsWith(). https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-startswith   

There are some work arounds for the delegation issue. @WarrenBelz 's  blog has a good discussion here.

https://warrenbelz.blogspot.com/2020/08/power-apps-delegation-is-word-not.html 

View solution in original post

7 REPLIES 7
Super User II
Super User II

Hi @indhaa 

 

Filter(spList, Textinput1.Text in 'Full Name')

 

Be aware of some limitations.  First, the "in" operator is not delegatable in SharePoint, meaning that you may miss some records if your list is >2000 items and PowerApps will show a yellow triangle warning that can be ignored for lists smaller than 2000 items. Also, fyi, it is preferable to use camel case and avoid the use of spaces in your column names.  ie FullName instead of Full Name.

Quick question, when checking > 2000 is it including the latest records in the search or I might miss in between? If so better to create two column as FirstName and LastName, right? 

 

Yah, the column is named as FullName. I just mentioned it with space just for reference only 

Hi @indhaa 

It will only search the first 2000 items in the list. To search the newest 2000 records, Sort the list by ID in descending order first. SharePoint assigns an ID to every record in the order in which the record is created.  Delegation in SharePoint will only work for StartsWith().  If you separate the names, you will be able to search any number of records with StartsWith(). https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-startswith   

There are some work arounds for the delegation issue. @WarrenBelz 's  blog has a good discussion here.

https://warrenbelz.blogspot.com/2020/08/power-apps-delegation-is-word-not.html 

View solution in original post

Thanks for the kudos but if it answers your question please accept it as a solution.

Hi,

 

I tried to use as instructed but it is not prompting any records now. Can you let me know what is the issue with the below code. 

Filter(WiFiAccess, TextSearchBox1.Text in "FullName")

I want to include the above inside the below code after it is working correctly

 

SortByColumns(Filter([@WiFiAccess], StartsWith(FullName,TextSearchBox1.Text)||StartsWith(Organization,TextSearchBox1.Text)), "ID", If(SortDescending1, Descending, Ascending))

Hi,

 

Can I get some feedback on how to correct this!! 

I tried to use as instructed but it is not prompting any records now. Can you let me know what is the issue with the below code. 

 

Filter(WiFiAccess, TextSearchBox1.Text in "FullName")

I want to include the above code inside the below code (need some alteration) after it is working correctly

 

SortByColumns(Filter([@WiFiAccess], StartsWith(FullName,TextSearchBox1.Text)||StartsWith(Organization,TextSearchBox1.Text)), "ID", If(SortDescending1, Descending, Ascending))

Now ok. Got it working now

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (34,502)