Limit searches from the collection components to a specific column?

How can the search feature in the collection component be restricted to search only within a specific column? The current search is producing multiple results from all columns.

It’s not possible to set it up with the native search. You would have to use a custom search (pointing a text entry to a user-specific column, then filter the list based on that value.

It would eat into your updates quota, though.

Thank you for answering. I’ll work around it for now but hopefully the devs will create this functionality in the future.

This is a big problem … I have 3 filters on the collection but when a user searches, they can effectively do a search across the entire table and will see an item that contains those words. Any alternative to this?

Do you mean you only want users to search within what your filters allow? In that case, the only way is to create your own search using a user-specific column and an if-then-else column to determine what items fit the search term.

Thank you for your help and your offer for a solution! I think it’s a little strange though, how you can build a collection with let’s say only a handful of fields to essentially hide columns not needed or not used in your detail view, but the search box searches across all columns. Hopefully they change this soon

I doubt they change that behaviour. This has been discussed for a long time in the community. The best outcome is them letting us choose which columns are searchable.

Years later: Is there documentation to help me attempt this approach?

There’s no documentation, it’s just a workaround, but the step-by-step writing would look like this:

  1. Create a user-specific search column
  • In the Data Editor, add a new column on the table your Collection is using
  • Type: User-specific text (for example, call it “Search term (user)”)
  1. Bind a Text Entry to that column
  • On your screen, add a Text Entry component above your Collection
  • Source: the user-specific column you just created
  • This will act as your “custom search box”
  1. Decide which columns are allowed to be searchable
  • Add a new If-Then-Else column in the Data Editor (for example, “Matches search?”)
  • Logic (simplified idea):
    • If “Search term (user)” is empty → Then “true” (show everything when there is no search)
    • Else if one of your allowed columns “contains” the search term → Then “true”. You might want to do some lowercase and trimming on both sides so it’s “normalized” for checking.
    • Else → “false”

You might end up with logic like:

  • If Search term is empty → true
  • Else if Name contains Search term → true
  • Else if Category contains Search term → true
  • Else if Description contains Search term → true
  • Else → false
  1. Filter your Collection by that ITE column
  • On the Collection component, add a filter:
    • Where “Matches search?” is true
    • Now the Collection will only show rows where the user’s search term appears in the columns you explicitly checked for in your If-Then-Else column. It also respects any other filters you already had on the Collection.

The native search box should be disabled or removed for that Collection, otherwise users will still be able to search across all columns

Thanks so much! I’ve just gotten another project landed, so I won’t get back to this for a while. But what you describe sounds like what I need. I’ll post if I have more questions. THANKS!!