Searching for specific words that are in choice component?

I have a list of different types of wall constructions:

When trying to search for a specific type of wall construction, the end user would write something like:
“Hul 30”

It seems like Glide only allows exact matches in the search bar of choice components.
image

I tried making a split text column right next to the full length text descriptions, but I don’t know if it’s possible to implement the tags in a choice component.

Do you guys know any way I can make search possible like this on a choice component in a form?

Yeah, because “Hul” and “30” are not close to each other in your options. If they write “Hul ydervæg - 30” then it would work.

I assume you’re using this inside a form, so it’s a bit more difficult. I was thinking if you can point the search to a user-specific column, then write some JS to know the matching percentage between the search term and your strings. Maybe just show choices that have more than 75% match, for example.

1 Like

Hmmm. That’s quite the workaround for me.

I’ll see if ChatGPT can help with the JS.

Just a thought, would it make sense to split those into two separate choices?

I don’t speak the language, so I have no idea what “Hul ydervaeg” means, but if that’s some sort of category, perhaps they could select that first, and then offer a second choice that’s filtered by their first selection?

1 Like

Seems like a construction-related thing. I had it translated as “Cavity wall - 35 cm brick - uninsulated cavity”.

You got a good point that maybe there’s a chance to separate it into 2-3 choice components.

1 Like

This would be a solution, but it eliminates the purpose for my intended use of the search bar.

The idea is to either choose a predefined wall type or create your own. I’d like to be able to search through all of the predefined walls by simply searching for terms that is included in the wall.

This could be a good function to add to the settings of a choice component. EDIT: To elaborate on this I’d like to give an example:

It could be as simple as giving you a choice to how the search is functioning:

  • Show all results containing the input text? I think it’s called a Substring Search?
  • Show results with consecutive words? I think its called a Phrase Search?

I think if you want to do it within the current capabilities of Glide, you would have to:

  • Create a user-specific column.

  • Point a text entry to that column.

  • Use a split text column to split that entry value by a space character.

  • On your list of choices, also create a split text column to split by a space character.

  • Create a relation between the two split text column so you can get partial matches.

1 Like