Relationship Filtering

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 using all available filters which are Cooking, Gardening and Marketing, the result of AND filter is just Paul, because Paul exists in all interests/skills.

For OR function, it has all the users.

compressed 2022-05-12 at 8.21.58 AM (1)

If we use just 1 filter, AND and OR result would be the same, but if we apply 2 filters, such as in the example, Gardening and then Cooking, the AND result would be just Paul, but OR result would include Bill, Sue, Sara and Paul too.

Hope this will clear some doubts about Adalo’s advanced capabilities.

1 Like

Hi,
Interesting.
Filters are OK, but if you want to filter your firends over the filter and/or if the people are in your group using 2 switch?

I didn’t understand the question.

Can you rephrase and use examples ?

What interests do you want to filter and what users should show up ?

OK I describe my scenario.
I have a list of event to filter with those parameter:

  1. time (today, tomorrow, this month ecc) but for now this is not important
  2. My subscribed event (on/off)
  3. My groups events. Show the event of the groups where I am member (on/off)
  4. Category of the events (tour, party, congress ecc)
  5. Subcategory (depends on the category like for tour, bike, skating, trakking ecc)
  6. Difficult (it depends on category to show or not the difficult

For the points 1, 4, 5, and 6 I resolved.
The problems are the points, 2 and 3.
Is it more clear.
Sorry for my english.

Thanks

Okay, this is clearer.

But I am still doing another variation of this app, looks like this could be the favorite. :smiley:

So, please expect tomorrow or later to get response.

1 Like

Hi @EvilDice ,

It turns out that I can’t stop, 10 hours straight, so here it is,

If you have questions, please give examples, so we can validate the process, and it also helps you to visualize better.

If you think the result is not right, give the right ones, and have more than 1 case, so I can reverse engineer what you are thinking.

Hi @Yongki ,
thanks for your time.
I don’t think your example can help me.
The follow are the front-end of a user flow:

List of event


As you can see there are 2 event’s subscribed and one no.
Clicking on the filte icon on top-right open the filter


I can filter by category and sub category


In this case category tour and sub Montain Bike
And it works

Now I want to filter just the event I subscribed
So open the filter again

and switch the button “show subscribed event”

The result must be the following

I know I can use bunch of custom lists and play with the visualization to show the combination of the switches.
But this is just the beginning.
May be I have to add others switches.
Is there a way to make some custom filter on just one custom list?

Thanks.

PS.
I have an idea, but I’m not sure if it works.
May be this evening I’ll try.

I’m sorry for interfering here!

I guess you are storing subscribed/unsubscribed events in a Many to Many relationship. I believe when you add that filter as a OR in the list it should work!

Hi, thanks for answer, but I don’t think it’s work.
I tryed and no.
May be you mean to be implemented in other way.
The problem with the OR is that you can have a lot of block of AND divided by OR.
But how you can tell to the system to choice the right block of AND?
In my case I have 4 combination of swithces possible.
And the swithces is not related to the event, but on the logged user variable.
So how can you filter in one list where all users can access at the same List?
Now I have to go.

Any suggestion is welcome.

And I frogot.
I have the filter by time… this is an other problem

I wish you given this earlier, I was thinking about dual relationship parameters.

But your need is different than that, so here is the different app,

1 Like

OR is used for special need, most of use cases use AND, this is just to demonstrate Adalo’s capability of OR.

Hi @Yongki ,

thanks again for your time.

I saw and test the app you made.

It seems good.

I have little difficult to understand your way to made a demo. Very complicated for my taste :sweat_smile:

Anyway in this case you use more the one list in the main view and don’t understand why I have to flag “All category” when no category is selected.

There is an issue on city bike sub category, is not listed in subcategory when select the Tour category.

But it’s not important.

As I told before I tested an idea yesterday night.

It is very weird but works perfectly using just one list of events.

Untitled

I create 4 blocks of AND divided by 3 OR and I found a way to force the system to activate just one block instead the others.

4 blocks because I have 4 possible combination of switches in the filter.

In the first block we haven’t no switches. So no filter about those.

Filter by window time.

Filter by Category.

Filter by Sub-Category

Filter by Difficult.

OR

In the second block we have the filter by subscribed. So I added the filter.

The rest of filters is the same.

OR

In the third block we have filter by “my groups”. So I added this filter

The rest of filters is the same.

OR

In the forth block we have bot switches. So I added both filters.

The rest of filters is the same.

Without the option to use brackets in a boolean expression in Adalo, is very difficult to activate just one block because the first condition on the first block is always verified like all others blocks.
If you put in the first custom filter the otpion of “show unsuscribed events”, you see just those and the subscribed are excluded.
But I need to see all events (subscribe and unsusbscribed) and when the user want, see just subscribed events.
May be the user need to see just unsusbscribed events. So I have to modifiy something.

By the way, I found a way to make just one block verified instead the others.

I don’t know if it’s clear the concept… I’ll make a video to explain better.

1 Like

I will read later and fix some issues, just need couple of days to cool down.

A quick response, toggling off All Category is easy, just need to update action to false, and I use 1 custom list for this.

Thanks.

1 Like

Hi @Yongki ,

Are you sure it also works with multiple users?
Right now the login is unique which makes everything much easier to manage.

Why doesn’t the “all events” list show categories and subcategories?
For this I thought more than one list was used.

Anyway I’m curious to see how you did the custom filter.

Thanks

Hi,

I have updated the example app (type #2, link above)

This time, it show result in another screen, probably better this way.

I include another demo login, so you have no doubt about multiple users.

About OR blocks, it could be your interpretation about filtering works, you still can achieve it in single custom list, but I use groups inside them (only 2 groups, the events I am Subscribing as true and as false)

You may try it again.

This is just an example app that allows you to see what happen if configured around your requirement.

Hey,

I tested but the flag of the group doesn’t work.
And there is the weird problem of the sub-category “city bike” again.

Anyway.
I added other features to the original filters :sweat_smile:

Now the list must show:

  • Public event (all user can see the event and subscribe)
  • Public event published by a Group (the administrators and the owner can do it; all users can see the event and subscribe)
  • Private event assigned to a Group (like before, but just the members of the group can see and subscribe the event)

I resolved it by modifing the first “AND block” (the block without teh switches subscribe and group turned on) and adding a OR to show the Public event applying all the filter.
In this case the 2 blocks can works together like a normal OR boolean expression.
I update little bit the other blocks.

IT WORKS!!

With this methods I can create complex filter simulating the brackets in the boolean formula.

1 Like

Great, happy to hear that.

By redoing and seeing other’s work, it can stimulate us. :smiley:

1 Like

I’ll try to make a video to explain this method.
May be it’s a new way and could be useful for all.

1 Like

Hey @Yongki
here the video tutorial of my method.

2 Likes

Hi @EvilDice ,

Congratulations, thanks for sharing.