Scoping a Collection Search

Is it possible to scope the search function for collections so it only matches specific fields, or is there possibly a workaround?

For context, I have a directory based on my users table, which has a lot of columns, including some that reference users. This means that a search for Alice returns everyone named Alice, as well as anyone where Alice is referenced in another column. What I’d like to do is scope the search so that matches are only made for certain columns (or alternately, certain columns are excluded.) Any suggestions for how to approach this situation?

Thanks!

I think the only way you can do it is build your own search function.

  • Create a user-specific column called “Search value” on top of the table where you build the screen.

  • Point a text entry component to that column.

  • Create a query column pointing to the table where you want to search. Filter as needed (e.g: Name includes Search value OR Location includes Search value etc).

  • Display two collections on the screen, one showing everything when the search value is empty, and one pointing to the query above when the search value is not empty.

2 Likes