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
Solved! Go to Solution.
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
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
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
User | Count |
---|---|
206 | |
94 | |
87 | |
47 | |
43 |
User | Count |
---|---|
252 | |
104 | |
103 | |
61 | |
57 |