šŸ”Ž Glide: Search Box Tips and Tricks

Glideā€™s in-app search box doesnā€™t allow for advanced searches. See how you can add tags to your content (and then hide them!) in order to improve your usersā€™ search results.

24 Likes

Like the new videography ! :+1::+1::+1:

1 Like

Two questions:

  1. do Rich Text get searched (or is it strictly ā€˜plain textā€™ only)?
  2. Cool video - what tool / service are you using to make it?

Thanks - very helpful. I learned new things and have already put them into practice. Great job, @Robert_Petitto !

It seems to work on rich text as well (I just did a test on my app - Members view - and picked a word that only existed in the ā€˜Bioā€™ in one doc, presented currently as a Rich Text field). The Bio column itself is just Text.

Yesā€¦any text works ā€¦rich text, basic text, basic column text, title component etc. It does NOT work with any sort of captions (card view captions, image captions, etc.).

Screenflow for Mac :wink:

1 Like

Thank you so much :pray: for your tips , video and this message. I looked exactly this information: how to add more search criteria since yesterday! Very useful and easy to apply!

2 Likes

Thanks @Robert_Petitto.

Even if it is not a native Glide function, I share an approach to build ā€˜Advanced Searchā€™ feature for end-users. Objective being to have different choice components which are independent the one from the other

Illustration with a list of projects to search per different criteria
https://www.loom.com/share/8848eda6e9dd4b58bebf673d3c15d42f

=> IN DATA EDITOR: Tab: [Project]

  • User email

  • Project TYPE

  • Project STATUS

  • Project VISIBILITY

  • User Specific TYPE

  • Single Value TYPE

  • User Specific STATUS

  • Single Value STATUS

  • User Specific VISIBILITY

  • Single Value VISIBILITY

  • Template Origin data: 123 (:warning: no space), set origin columns

  • Template USC: 123 (:warning: no space), set USC columns

==> IN SCREEN:

  • 3 choices components
  • 1 Inline list filtered with if
    . TP2 empty ā†’ user email
    . TP2 = TP1 ā†’ user email
    . TP2 included in TP1 ā†’ user email
    Else ā€œemptyā€

NB: for the dynamic ā€œSort byā€, the approach is here.

1 Like

I know there is no boolean operator usable in the search bar.
But, is there a workaround to have an OR search? Iā€™d like the search to spit out the table row that has either one of the term words I place in the search bar.
A workaround for an AND search would be useful as well, but in the application I am thinking, the OR is more useful.
FYI, I cannot use the multiple filters method, too many possible terms to filter forā€¦

The search bar will search for anything in your list view as well as any inline list in the details view. What you could do is hide the additional search terms in the details view. (Set a filter that would never show)

Maybe I have not understood it properly, but I think this will not work as well. My situation is different than the one @Robert_Petitto shows. Iā€™d like for a user to freely enter search terms to be looked up in the rows of the table. I cannot indicate preliminarily any ā€œsearch termsā€; it would be the same as using the ā€œmultiple filterā€ method, that would not be appropriate in my application.

Couldnā€™t you use the approach with a template column and text entry component?

  • Template column: concatenates all columns having words to search for
  • Text entry component: writing to a user specific column, with its value being duplicated in each row via a single value column
  • Inline list: filtered by ā€œIf template column includes single value columnā€.
1 Like

Yeah I believe this is a good way to approach it. I used it for doing custom searches in some of my apps.

A custom search box would still kind of be an AND search and try to match the entire string, so not much different from the built in search capabilities. I wonder if your idea could be expanded and the single value column is split in a Split column to get an array of search terms. Then compare the array to the template column??? Iā€™m not by a computer to try it out, so Iā€™m not sure if itā€™s even possible. Just shooting out ideas. If it would be possible, then maybe it would allow for an OR search of multiple words where only one needs to match. I still donā€™t think it would allow for a true AND search though, where all words would have to match even if they arenā€™t located next to each other in the template string.

Maybe a different approach would be to split the template column into an array in addition to the single value column??? Maybe involve a relation using the arrays? Iā€™m not sureā€¦I know there are some quirks where split arrays work differently from lookup arrays, but there have been several changes in the past month that I havenā€™t been able to rest out yet, so Iā€™m not sure if my random thoughts are possible.

2 Likes

Ah youā€™re right that the AND would be trickier to pull off. If youā€™re having a lot of columns then it will be much bigger of a problem.

1 Like

I am thinking now, what if you can use a LOOKUP function in the linked GSheet, using a AND or OR in the argument of the function? I have seen these functions also working with wildcard (e.g. nam* will find name, naming, names, etc.).
With some work arounds one can:

  • generate the text field for the user search terms
  • split the search terms into single words, adding a ā€œ*ā€ before and after
  • use those modified single words as argument in a LOOKUP function having OR (or AND) in the search argument; the LOOKUP function could spit a tag or something else that Glide can filter for.

Would that work?

You might want to take a look at this post. It might not be exactly what you are looking for, but I bet that you could create some script that could be called through an Experimental Code column to perform some advanced searching capabilities.

2 Likes

Hello @Jeff_Hager
I havenā€™t seen this post, but I can adapt my script to your needs. What would be the modifications to be made?

Iā€™m thinking something where you pass in a string of text to search, a string of search terms and an AND/OR choice. So something really really similar to what you already have, but it would take one criteria parameter (multiple search terms) instead of two, split the text on each space, then compare to the passed in text to be searched.

If you are feeling adventurous, you could probably eliminate the AND/OR option and somehow set it similar to Google search. Google is a little more complex, but essentially each search word is like an OR, but you can put double quotes around a single word to make it required to be in the results, like an AND. You can also put double quotes around a phrase to make that entire phrase required to be in the results. So depending which words or phrases have double quotes, a single search box could perform an AND and OR search at the same time.

That description got a little more complex than I originally thought. I hope it makes sense.

3 Likes

OK
Well I already have that.
Finds if only one criterion, each word separation is a criterion, with an And option.
But I will revise my copy to do like google !!!
Itā€™s less simple but hey Iā€™ll look for it

2 Likes