# Complex list filtering

**URL:** <https://forum.adalo.com/t/complex-list-filtering/31041>\
**Category:** Get Help\
**Created:** [August 21, 2022, 4:26pm UTC](https://forum.adalo.com/t/complex-list-filtering/31041 "2022-08-21T16:26:37Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vitiniel](https://avatars.discourse-cdn.com/v4/letter/v/3d9bf3/32.png) [@Vitiniel](https://forum.adalo.com/u/Vitiniel)\
**Post date:** [August 21, 2022, 4:26pm UTC](https://forum.adalo.com/t/complex-list-filtering/31041/1 "2022-08-21T16:26:37Z")

</div>

Hello… broke my head already… but can’t understand how:

I have a database of events for example lessons… they have lots of parameters ( start time, end time, name, category and etc)…

i want to let user choose which catetories ( not only one category as i can do with dropdown menu)… to see in the list considering other filters such as time/class and etc.

I have modal screen with toggles where user chooses which lessons he wants to see in the list.

How to do it?

I have a custom filter with lots of conditions for example : Date , Time - so i can see only lessons that starts today.

But i want them to filter among already made list lessons with multiply categories ( science, literature, maths etc)…

I want to make user choose which categories of lessons they can see for date/time filter( today).

I know how to do it with one single category… but how to let them choose all of them or two out of five and etc?

---

<div class="post-metadata">

**Author:** ![Yongki](https://avatars.discourse-cdn.com/v4/letter/y/7c8e57/32.png) [@Yongki](https://forum.adalo.com/u/Yongki)\
**Post date:** [August 21, 2022, 8:45pm UTC](https://forum.adalo.com/t/complex-list-filtering/31041/2 "2022-08-21T20:45:25Z")

</div>

Hi @Vitiniel ,

There is an example app related to this,

> [@Relationship Filtering](https://forum.adalo.com/t/relationship-filtering/27114):
>
> PSABH Series presents relationship filtering example app. If we want to filter by interests or skills that users have, we can use relationship filtering to do that. There are 2 different operators, the most common way is AND, which is users must have both interests to be shown, but we can use OR to display users that have at least interests asked. The above example are u…

If you are interested, please comment there.

---

<div class="post-metadata">

**Author:** ![Vitiniel](https://avatars.discourse-cdn.com/v4/letter/v/3d9bf3/32.png) [@Vitiniel](https://forum.adalo.com/u/Vitiniel)\
**Post date:** [August 21, 2022, 9:36pm UTC](https://forum.adalo.com/t/complex-list-filtering/31041/3 "2022-08-21T21:36:08Z")

</div>

Thanks for answer, but without looking into project itself it’s hard to understand ☹  
My filter works like this right now:

I have a list with lessons…which i filter by:

- start time is between current time and tomorrow AND
- is single time lesson (it means not series of courses) AND
- is free

According to this AND filters i got my list.

What i’m trying to do… is to make somehow a screen with toggles where i can toggle for current user which categories he wants to see…

But my problem that if i add AND filter - i can filter only by one category… i cannot add a filter group inside a main filters… so i can’t filter all those results that i got from first filter again but by categories now ☹

I really wonder is it really possible to do multiselection for categories inside already filtered results ☹

---

<div class="post-metadata">

**Author:** ![Yongki](https://avatars.discourse-cdn.com/v4/letter/y/7c8e57/32.png) [@Yongki](https://forum.adalo.com/u/Yongki)\
**Post date:** [August 21, 2022, 11:44pm UTC](https://forum.adalo.com/t/complex-list-filtering/31041/4 "2022-08-21T23:44:30Z")

</div>

It is possible.

---

<div class="post-metadata">

**Author:** ![EnriqueGomez](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/enriquegomez/32/18235_2.png) [@EnriqueGomez](https://forum.adalo.com/u/EnriqueGomez)\
**Post date:** [August 22, 2022, 4:07am UTC](https://forum.adalo.com/t/complex-list-filtering/31041/5 "2022-08-22T04:07:25Z")

</div>

It’s tricky to make it work properly but it’s possible.

Here some useful ideas:

- Search by multiple characteristics [Creating Custom Searches and Search Bars in Adalo - YouTube](https://www.youtube.com/watch?v=ddf3dx-bIhs&list=PLhf6I77AX7VTVzPq01bKgvs3Qwxjv4Hf4&index=60&t=33s)

- Set a filter back to empty [[SOLUTION] How to allow user to delete image from a record](https://forum.adalo.com/t/solution-how-to-allow-user-to-delete-image-from-a-record/18130)

- It is not necessary to create a relationship between databases to make it work, it is enough to set a filter that only shows lessons if its price is equal to Logged in user \> price filter

---

<div class="post-metadata">

**Author:** ![Vitiniel](https://avatars.discourse-cdn.com/v4/letter/v/3d9bf3/32.png) [@Vitiniel](https://forum.adalo.com/u/Vitiniel)\
**Post date:** [August 22, 2022, 6:34am UTC](https://forum.adalo.com/t/complex-list-filtering/31041/6 "2022-08-22T06:34:25Z")

</div>

price is not a problem…  
I have custom filter with three or four ANDS… that works pretty good… after that i got a list…  
and i need to filter it by multiple conditions…

if i add only filter by one category it’s just another AND and that’s easy…

but what i have to do if i need to check for something in USER LOGGED that keeps track of which toggles in another screen are on… and i have to filter only by those categories?

To do it… i need somehow to put this temporary info into Sessions database ( which list i want to filter)…  
i thought of making somekind of Filtred\_Category parametr in Users so i can keep there “text string” with numbers that represents each category… if 9 categories so i will have like string 123456789 if one of them turned off it will be 0.  
And my idea was to check if Sessions category number exists in this string… but in adalo i have only Contains. ☹ and i’m stuck ☹

---

<div class="post-metadata">

**Author:** ![Vitiniel](https://avatars.discourse-cdn.com/v4/letter/v/3d9bf3/32.png) [@Vitiniel](https://forum.adalo.com/u/Vitiniel)\
**Post date:** [August 22, 2022, 6:43am UTC](https://forum.adalo.com/t/complex-list-filtering/31041/7 "2022-08-22T06:43:34Z")

</div>

i checked all those custom searchs via invisible input field or anything but it not works in my case… these search bars allows user by searching all text that contained in that search field… but i have time and etc… and honestly i don’t understand how to do this filter if i don’t need search bar…

I got a list filtered by some conditions (time and etc)… now i want to check if toggles for specific categories in User logged are for visible - i want to see only these events from already filtered list… the rest ignored.

the only thing in my mind make lots of filter combinations for each case… but i have 9 categories… and it’s not possible to put all these combinations into adalo.

Maybe anyway can make a demo? For example we have a list which first filtered by time ( for example events for today and ignores every other)… and then filter it again by choosen categories?

i can’t understand how to impletemnt search bar into it ☹

---

<div class="post-metadata">

**Author:** ![EnriqueGomez](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/enriquegomez/32/18235_2.png) [@EnriqueGomez](https://forum.adalo.com/u/EnriqueGomez)\
**Post date:** [August 22, 2022, 3:09pm UTC](https://forum.adalo.com/t/complex-list-filtering/31041/8 "2022-08-22T15:09:11Z")

</div>

> [@Vitiniel](#):
>
> i thought of making somekind of Filtred\_Category parametr in Users so i can keep there “text string” with numbers that represents each category… if 9 categories so i will have like string 123456789 if one of them turned off it will be 0.

You are right, you should create a parameter in Users database to save each user filter preference.

1. Create 9 properties in Users BUT instead of number use a text property, if it is ON will be 1 if it is OFF will be empty (no 0 nor text empty) i mean no data saved there.
2. Then use 18 buttons (only 9 visible) to display if the User has each property turned ON (1) or OFF (empty) check [https://www.youtube.com/watch?v=77IAZ-Tqcxw&t=167s](https://www.youtube.com/watch?v=77IAZ-Tqcxw&t=167s)
3. Set 9 new filters in lessons list, for example: category 9 IS EQUAL TO Logged in User \> category 9 preference.

This should work but it is also possible using toggle components and using a search index parameter but it will take me to explain some workarounds that are kinda messy.

Here some other helpful ideas regarding filters:

- [https://www.youtube.com/watch?v=zKpsdeUFq9g&list=PLhf6I77AX7VTVzPq01bKgvs3Qwxjv4Hf4&index=18&t=718s](https://www.youtube.com/watch?v=zKpsdeUFq9g&list=PLhf6I77AX7VTVzPq01bKgvs3Qwxjv4Hf4&index=18&t=718s)
- [https://www.youtube.com/watch?v=M9lWofNptv8&list=PLhf6I77AX7VTVzPq01bKgvs3Qwxjv4Hf4&index=45](https://www.youtube.com/watch?v=M9lWofNptv8&list=PLhf6I77AX7VTVzPq01bKgvs3Qwxjv4Hf4&index=45)

---

<div class="post-metadata">

**Author:** ![Vitiniel](https://avatars.discourse-cdn.com/v4/letter/v/3d9bf3/32.png) [@Vitiniel](https://forum.adalo.com/u/Vitiniel)\
**Post date:** [August 22, 2022, 8:05pm UTC](https://forum.adalo.com/t/complex-list-filtering/31041/9 "2022-08-22T20:05:37Z")

</div>

What you wrote is working for one selection … i checked all those videos…  
every one of them have only one filter… that is by search string…

If i will do how u said… i think i will face this situation ☹ For example 2 categories i will include in user Cat\_1\_choice and Cat\_2\_choice and it will be 1 or 0 for example. It will be controlled by toggles or custom icons… on separate screen.

Problem appears when i have a list… _already filtered_ list by time/type and etc…  
and now if i need to check Multiple category selection  
i can’t just add search string in it or something cause i can’t have filter inside already filtered content…

all i need to do is to make with OR all possible filters?  
[regular filters that i use for first filtering] and then adding Cat\_1\_choice = 1 Cat\_1\_choice=0 , then i do OR … adding again regular filters and do Cat\_1\_choice=1 Cat\_1\_choice=1, then i do OR again and regular filters and Cat\_1\_choice=0 and Cat\_1\_choice=1 and so on for all possible variants for 9 categories? I’m totally lost here… u all sayin that i can do it, but i can’t understand how :(( sorry for that.

All videos above are working with only one custom filter but not with an idea to filter something out of already filtered list.

---

<div class="post-metadata">

**Author:** ![EnriqueGomez](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/enriquegomez/32/18235_2.png) [@EnriqueGomez](https://forum.adalo.com/u/EnriqueGomez)\
**Post date:** [August 22, 2022, 11:00pm UTC](https://forum.adalo.com/t/complex-list-filtering/31041/10 "2022-08-22T23:00:17Z")

</div>

> [@Vitiniel](#):
>
> all i need to do is to make with OR all possible filters?  
> [regular filters that i use for first filtering] and then adding Cat\_1\_choice = 1 Cat\_1\_choice=0 , then i do OR … adding again regular filters and do Cat\_1\_choice=1 Cat\_1\_choice=1, then i do OR again and regular filters and Cat\_1\_choice=0 and Cat\_1\_choice=1 and so on for all possible variants for 9 categories?

Almost it, but i meant something like:

- (Date, Time) filter  
AND
- Price filter  
AND
- Lesson\_Cat\_1 (always 1) = Loggedin\_userchoice\_1 (could be 1 or EMPTY)  
AND
- Lesson\_Cat\_2 (always 1) = Loggedin\_userchoice\_2 (could be 1 or EMPTY)  
AND
- Lesson\_Cat\_3 (always 1) = Loggedin\_userchoice\_3 (could be 1 or EMPTY)

AND SO ON…

---

<div class="post-metadata">

**Author:** ![Vitiniel](https://avatars.discourse-cdn.com/v4/letter/v/3d9bf3/32.png) [@Vitiniel](https://forum.adalo.com/u/Vitiniel)\
**Post date:** [August 23, 2022, 6:20am UTC](https://forum.adalo.com/t/complex-list-filtering/31041/11 "2022-08-23T06:20:15Z")

</div>

hmmm…but am i right that if there will be ANDs and i will use only one custom filter for this… i will cover only one possible variantion? and i need to make lots of custom filters with ORs to cover all possible multiselection variants for 9 categories ? in example of 3 categories… if i will make filter 1 0 1 so i will cover only possible variant where user wants to see cat 1 and cat 3…but if he will change it to 1 1 0 i need to have another full filter incl date/time/price and ANDS for categories with 1 1 0… so i need to cover with ORS all variants 0 0 0 , 0 0 1 , 0 1 0, 1 0 0 , 0 1 1 , 1 0 1 , 1 1 0 , 1 1 1 am i right in this logic?

---

<div class="post-metadata">

**Author:** ![EnriqueGomez](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/enriquegomez/32/18235_2.png) [@EnriqueGomez](https://forum.adalo.com/u/EnriqueGomez)\
**Post date:** [August 23, 2022, 2:20pm UTC](https://forum.adalo.com/t/complex-list-filtering/31041/12 "2022-08-23T14:20:10Z")

</div>

> [@Vitiniel](#):
>
> cover all possible multiselection variants for 9 categories

no necessary, the logic is that the filter modifies itself everytime user chage its preferences, for example:

- (Date, Time) filter  
AND
- Price filter  
AND
- Lesson\_Cat\_1 (1) = Loggedin\_userchoice\_1 (1)  
AND
- Lesson\_Cat\_2 (1) = Loggedin\_userchoice\_2 (EMPTY)  
AND
- Lesson\_Cat\_3 (1) = Loggedin\_userchoice\_3 (EMPTY)

This means user will see only lesson 1  
If user change its filter preferences still work like this…

- (Date, Time) filter  
AND
- Price filter  
AND
- Lesson\_Cat\_1 (1) = Loggedin\_userchoice\_1 (EMPTY)  
AND
- Lesson\_Cat\_2 (1) = Loggedin\_userchoice\_2 (1)  
AND
- Lesson\_Cat\_3 (1) = Loggedin\_userchoice\_3 (1)

This means user will see lessons 2 and 3… and so on.

---

<div class="post-metadata">

**Author:** ![Vitiniel](https://avatars.discourse-cdn.com/v4/letter/v/3d9bf3/32.png) [@Vitiniel](https://forum.adalo.com/u/Vitiniel)\
**Post date:** [August 23, 2022, 7:17pm UTC](https://forum.adalo.com/t/complex-list-filtering/31041/14 "2022-08-23T19:17:07Z")

</div>

thanks… looks like i beginning to understand… but sometimes i have a problem… if i have property… and by default it’s EMPTY… if i put something into it… i can’t turn it into EMPTY back…  
is there a way to put EMPTY there?

update: i see u have sent me lesson about image… thanks.

---

<div class="post-metadata">

**Author:** ![Vitiniel](https://avatars.discourse-cdn.com/v4/letter/v/3d9bf3/32.png) [@Vitiniel](https://forum.adalo.com/u/Vitiniel)\
**Post date:** [August 23, 2022, 8:36pm UTC](https://forum.adalo.com/t/complex-list-filtering/31041/15 "2022-08-23T20:36:52Z")

</div>

i did like that :  
 ![problem](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/e/7/e767fd408d2cd5690b651b271f5f9841c3c838de.jpeg)

I have list of sessions that related to event , each event has relation to category\_groupping with 9 entries . Each entry has a name, category\_number … and every category\_number is equal to 1.

I did modal window with toggles…and it works perfect… User database got 18 properties cat\_x and cat\_x\_empty in modal window i do change cat\_x to 1 if i turn on and change cat\_x to cat\_x\_empty if off… debuggin text shows it works perfectly…  
this screen shows which filter i set up in list … and it doesn’t work ☹ all what it do right now that if i turn on at least one category - every lesson that has no category\_groupping attached disappears from the list and it shows only those that already has category\_groupping attached.

But if i change toggles in anyway - nothing changes… all of events with category\_groupping attached shows up… and it doesn’t matter which category it is… it just shows up. Where i’m wrong ? ☹

---

<div class="post-metadata">

**Author:** ![EnriqueGomez](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/enriquegomez/32/18235_2.png) [@EnriqueGomez](https://forum.adalo.com/u/EnriqueGomez)\
**Post date:** [August 23, 2022, 10:06pm UTC](https://forum.adalo.com/t/complex-list-filtering/31041/16 "2022-08-23T22:06:13Z")

</div>

Not sure but I bet you are in the right path.  
Unfortunately, we reach the point were I can’t help without give it a close look.

You need to make small experiments to discover what part of the logic is failing.

Also, there’s no need to create 18 properties in userdatabase, 9 + 1 is enough because you can reuse 1 cat\_empty for all.

I know this logic works because I use it in my PWA.

 ![Filters](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/7/d/7d30fd479cb42acbfccb9e86e7e19ff2659126b8.png)

---

<div class="post-metadata">

**Author:** ![Vitiniel](https://avatars.discourse-cdn.com/v4/letter/v/3d9bf3/32.png) [@Vitiniel](https://forum.adalo.com/u/Vitiniel)\
**Post date:** [August 23, 2022, 10:11pm UTC](https://forum.adalo.com/t/complex-list-filtering/31041/17 "2022-08-23T22:11:39Z")

</div>

how does your filter looks? i mean what are you filtering in this list beside search string?

right now i can’t understand how this filter can determine different categories, cause all of them has same value = 1. Or maybe i should make this value from 1 to 9 for each category it should be unique… and change in user properties the same ?

---

<div class="post-metadata">

**Author:** ![EnriqueGomez](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/enriquegomez/32/18235_2.png) [@EnriqueGomez](https://forum.adalo.com/u/EnriqueGomez)\
**Post date:** [August 24, 2022, 12:26am UTC](https://forum.adalo.com/t/complex-list-filtering/31041/19 "2022-08-24T00:26:46Z")

</div>

Could you allow clone your app? I can’t figure it out without playing with the alternatives.

---

<div class="post-metadata">

**Author:** ![EnriqueGomez](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/enriquegomez/32/18235_2.png) [@EnriqueGomez](https://forum.adalo.com/u/EnriqueGomez)\
**Post date:** [August 24, 2022, 2:22am UTC](https://forum.adalo.com/t/complex-list-filtering/31041/20 "2022-08-24T02:22:19Z")

</div>

> [@EnriqueGomez](#):
>
> Lesson\_Cat\_1 (always 1)

This may be missleading because a lesson now has: Lesson\_Cat\_1, Lesson\_Cat\_2, Lesson\_Cat\_3… right?

so Lesson A should have Lesson\_Cat\_1 (1), Lesson\_Cat\_2 (empty)… Lesson\_Cat\_9 (empty)

then, Lesson B should have Lesson\_Cat\_1 (empty), Lesson\_Cat\_2 (1)… Lesson\_Cat\_9 (empty) and so on…

I am trying to help but it’s hard to explain this kind of things when english is not my native language 😕

---

<div class="post-metadata">

**Author:** ![Vitiniel](https://avatars.discourse-cdn.com/v4/letter/v/3d9bf3/32.png) [@Vitiniel](https://forum.adalo.com/u/Vitiniel)\
**Post date:** [August 24, 2022, 10:41am UTC](https://forum.adalo.com/t/complex-list-filtering/31041/21 "2022-08-24T10:41:31Z")

</div>

[Filtering](https://previewer.adalo.com/c2404858-949f-4336-99f6-4bb180f335db) here i did exact same scheme that i have in my app… but just little bit simplier in data… What’s wrong here?

---

<div class="post-metadata">

**Author:** ![Vitiniel](https://avatars.discourse-cdn.com/v4/letter/v/3d9bf3/32.png) [@Vitiniel](https://forum.adalo.com/u/Vitiniel)\
**Post date:** [August 24, 2022, 11:43am UTC](https://forum.adalo.com/t/complex-list-filtering/31041/22 "2022-08-24T11:43:23Z")

</div>

I think i understood that i need to make properties in each Lesson like cat\_1\_vis cat\_2\_vis cat\_3\_vis and depending on category of lesson it will be empty or 1…  
for exmaple Sports will be cat\_1\_vis 1 cat\_2\_vis empty cat\_3\_vis empty  
Science will be cat\_1\_vis empty cat\_2\_vis 1 cat\_3\_vis empty…

okey i have this in database… so each lesson has all these cat\_X\_vis properties and only one of them has 1 in it… according to category of lesson…

Now i have filter that it checks if Current\_lesson \> Cat\_1\_vis = Logged\_in\_user \> Cat\_1  
AND  
Current\_lesson \> Cat\_2\_vis = Logged\_in\_user \> Cat\_2  
AND  
Current\_lesson \> Cat\_3\_vis = Logged\_in\_user \> Cat\_3

it shows only if ONE category choosed by the user… as soon as i check two of them or three… it does not show anything ☹ it can’t handle multi choice.  
☹ Why adalo can’t have Filters as layers… first filter… then among those that we already got from the database i can filter again by another values. ☹

[Next page](https://forum.adalo.com/t/complex-list-filtering/31041.md?page=2)
