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.
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
@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.
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.
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.
“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.
@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 @pford: Creating Custom Searches and Search Bars in Adalo - YouTube
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.
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.