I have seen several posts on this topic, but none fit my use case. I have a gallery connected to a SP list. I have put in text input box and am referencing that in my search code. I am not concerned with sorting, I just want to be able to type in one part of a variety of data points and have the list item display, so STARTS WITH is not an option for me.
in the below code the search works perfect when just 'Title' and "Course_x0020_ID" stated. if I change either of those or add on additional columns to search in, the gallery disappears and it says I have an error. How can I search in the 5 columns I show in the code below? Also - this list could grow to larger than 500, I have seen some limitations around capacity. I welcome feedback to work around the capacity issue
My list name is: BOE
Solved! Go to Solution.
Your formula is not correct, change to:
Filter([@BOE], txtBOESearch.Text in Title || txtBOESearch.Text in Course_x0020_ID || txtBOESearch.Text in End_x0020_Date || txtBOESearch.Text in Start_x0020_Date || txtBOESearch.Text in Session_x0020_ID )
You can also shorten and resolve the blank search with:
Filter([@BOE], txtBOESearch.Text in Title & "|" & Course_x0020_ID & "|" & End_x0020_Date & "|" & Start_x0020_Date & "|" & Session_x0020_ID || IsBlank(txtBOESearch.Text) )
I hope this is helpful for you.
@JTischler You can use the in operator,
Search([@BOE],"Title" in txtBOESearch.Text || "Course_x0020_ID" in txtBOESearch.Text || "End_x0020_Date" in txtBOESearch.Text || "Start_x0020_Date" in txtBOESearch.Text || "Session_x0020_ID" in txtBOESearch.Text )
Thanks @CNT , I was trying that method earlier but couldn't get the syntax right. Unfortunately that doesn't work either. It says there aren't enough arguments and also I again get the error about not recognizing the identifier. Once I comment out the extra identifiers, you can see the data populates again. Please check the attached screenshots. Thanks much!!
@JTischler Oops! Got to use the Filter function,
Filter([@BOE],"Title" in txtBOESearch.Text || "Course_x0020_ID" in txtBOESearch.Text || "End_x0020_Date" in txtBOESearch.Text || "Start_x0020_Date" in txtBOESearch.Text || "Session_x0020_ID" in txtBOESearch.Text )
@JTischler Try revising it,
Filter([@BOE], txtBOESearch.Text in "Title" || txtBOESearch.Text in "Course_x0020_ID" || txtBOESearch.Text in "End_x0020_Date" || txtBOESearch.Text in "Start_x0020_Date" || txtBOESearch.Text in "Session_x0020_ID" )
@CNT I did, and nothing displayed. Initially with a blank search box all items should display, but nothing does. In my original formula if I limited my criteria to title and course ID then I could see the list item. As soon as I added more criteria, then the item disappears.
@CNT That revision made progress, it does allow the list item to populate, but as soon as I enter anything in the search box, the item disappears. I have tried partial and exact with no results
Learn how to create your own user groups today!
Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!
Check out the new Power Platform Community Connections gallery!