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…
I’ve been reading the threads but I’m still not sure what’s the current status of searching within a Glide app.
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.
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 . 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:
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.
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.
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…