Filtering is not working

Hi Guys.

I am having a problem with filtering.
I have a list of users, some are businesses and others would be normal users who would be searching for businesses and other users.

I have created the search page. On the filtering, I have stated that the business must contain the search, and user name must contain the search but it doe not show anything when I search.
What could I be missing?

I have looked over and over at tutorials on YouTube that show how it should be done but I just can not figure out what it could be that I am missing. I want to attach pictures to show you what I have done but it does not allow me.

Hi @Andile,

It’s difficult to guess what you’ve set up incorrectly without any screenshots or video showing the setup and the problem.

Have you read this section Sorting and Filtering Lists - Adalo Resources and this tutorial How to Create a Search Bar - Adalo Resources?

Best regards, Victor.

Yeah I wanted to share but I am experiencing a problem attaching. I will have a look at what you sent and see what the problem could be.
Thank you Victor

1 Like

@Andile by the way, if you added 2 filters, something like (BusinessName - Contains - SearchInput) and (UserName - Contains - SearchInput), you won’t get results for search.
Filters in lists work by “AND” condition, i.e. for the item to be displayed, both conditions should be met.
In your case, I’d recommend having a “Is Business” true/false property, add it as a first filter (=true), and add 2nd filter “Name” contains searchInput.

Best,
Victor.

So I have managed to attach the picture and as far as I can see it seems all is as it should be.





Well I did think this could be an issue so to test I removed all filters and just used one eg Username and it was doing the same thing. Let me try again just to double check.

@Andile,

So, your first screenshot shows that in order for the record to be shown, ALL conditions (Username, Businessname and some other) should be met.
As I told before, filters work based on “AND” logic.

Best,
Victor

You are right. I just remove everything and it seems to be working. Now can you please send me a screenshot of what you mean by the “and” logic.

@Andile

“AND” logic means that for the item to be displayed, both filter conditions should be met.
So: if you have 2 filters, for example, (BusinessName - Contains - SearchInput), (UserName - Contains - SearchInput), and you enter “Pizza” into search input, you’ll get the the records ONLY if their UserName contains Pizza AND their BusinessName contains Pizza.

Best,
Victor

So how would I state it to only select the every business and user name that contain that does contain Pizza and exclude everything else.

EG. I want it to search by name(business or personal), address, service or product etc. This is what is what is the proble.

@Andile one of the ways is to create a separate “Search Index” property in the collection, where you put all the info you’d like to be “searchable”, and use this Search Index with “Contains” filter.
Have a look at this video by @pfordmedia: Creating Custom Searches and Search Bars in Adalo - YouTube

Best,
Victor.

Thank you so much. I will have a look at it right away. You have been a lot of help.

1 Like

You have no idea how many times I have watched that tutorial. The problem is I did not know what I was looking for until you mentioned the “and” logic. You are a lifesaver because my entire app was depended on this small part. I had that blank screen created but did not use it properly.

Thank you so much.

1 Like

I am still having an issue here. There users are created as logged in user therefor update as such. If I am using the solution on the tutorial you suggested I would need to update them as current user so I am not sure how I would do that. Can you please give a suggestion.

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