Searching everything from the home screen: tabs, collections or rows of data

Hi guys,
Has Glide’s in-app search capabilities improved lately? I would like to have a search bar on the home screen that can pull the row data from anywhere in my app/database and present it as a direct search result.

At the moment, from the home screen a user would first find the relevant category → open the category → then search again within the category/collection to find the item that they’re looking for. Too many steps… :face_with_diagonal_mouth:

I’ve been reading the threads but I’m still not sure what’s the current status of searching within a Glide app.

Thanks for your help.

For native search, no, that still ties to collections shown on the screen.

I’m not sure how you build the “category” part, but as long as you have a collection tied to that relevant category (and of course tied to a table), then you can enable searching for that collection.

1 Like

I have 2 main tables:

  • 1 for businesses
  • 1 for activities/events

I grouped the businesses into categories like Sports, Construction, Wellness, etc. using relations. And I display these categories as a collection on the home screen.

I have a search bar for each level.
Ideally, if the search bar on the home screen can search beyond the category and into the sets of businesses and activities, this would be a huge improvement.

I tried to illustrate it below :smiley: . The red search box and results type is what I want, the rest is what I have and those results only direct you to the levels directly below them.

You could create you own custom search to do this.

Something like this:

  • Create a User Specific column to hold the search text. This should be in the table that your Home Screen is attached to. (Normally I’d say put that column in your User Profiles table, but I think your App doesn’t require sign in, yes?)
  • In each of the tables that you want to search, add the following columns:
    – A single value column, that fetches the search term from the Home Screen table
    – Now, lets assume you have a Name column in each table, and you want the search to apply to that.
    – Add and if-then-else column:
    — If Name includes search term, then true
  • Now on your Home Scree, add two collections, and make each of your two tables the source of one of the collections
  • Apply a filter to each, where “if-then-else column is checked”

That should do it for you.
The above is just a fairly simple example of what you can do in terms of custom filtering with data editor logic. For a somewhat more advanced example, check the below video:


If the above video won't play, paste the following URL into a browser:
https://www.loom.com/share/4398b34185c9435bacdd51b2332db722
3 Likes

yes, my app has no sign-in.
Ok, I will try this workflow, thanks a bunch. I’ll let you know if I get it to work. :smiling_face:

EDIT:
@Darren_Murphy I created the columns as you suggested but I’m not seeing an option to place the search bar on the home screen, I’m only seeing the option on the collections themselves.
I see that in your video, you set up filters and a query… It might take some time for me to understand what you did because I never used filters like this before. :+1:

You need to use a text entry component to act as your search bar.

4 Likes

ooohhh. ok!

Yeah, as Jeff said you need to add a Text Entry component for that. Sorry, I skipped that in my instructions.

That’s fine, I wasn’t suggesting that you try and apply any of that to your current use case. It was more to give you an idea of what is possible.

1 Like

Thanks so much Darren! Your demo was really great and definitely eye-opening.
I have a lot to learn!

I just got your custom search to work in my test app so I’m going to apply it and see if I can point the If-column to my tags. I’m very excited!

EDIT:
@Darren_Murphy Will I get the search to return multiple results per collection?

1 Like

Yes, it should return everything that matches.

1 Like

excellent

EDIT: @Darren_Murphy with this workflow, can I add a single card or text stating “No results found” if there are no rows in the If-then-else columns are checked?

I’m not sure what functions are available for this since it takes into account the data from 2 different tables and I don’t want multiple “No results found” statements.

2nd Edit: For now I decided to count the results and display as a text. This formula from @Jeff_Hager helped me greatly because I needed to weed out the expired activities…

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.