Multi Filters using Relations: a new way šŸ’”

Hola, feliz dĆ­a!

Watching some threads and good Robert Petittoā€™s videos about creating customized filters using an Inline List component, I thought an idea to make it simpler and avoid configuring manually the Inline Listā€™s filter and suddenly, I got this to share :wink::

  1. A way to have a wide Filter using the OR operator

  2. A narrow Filter using the AND operator

I recorded a video to show and help to understand how this APP demo works and its procedure: Loom | Free Screen & Video Recording Software

The trick is to work with a multiple relation base on values (filters) selected by user which will rule your Inline List data and as you can see, you donā€™t need to configure/create internal filters later.

image

You can copy my demo APP and learn better the procedure if you want:
https://multi-filters.glideapp.io

I hope it helps and complements Robertā€™s effort on this topic.

Saludos a todos!

19 Likes

I like what youā€™ve done with the template/split text combination.
Although Iā€™ve been creating these types of dynamic relations for quite some time, itā€™s always been a combination of template + if-then-else. The split text approach never occurred to me, but having seen what you did here I think itā€™s a better (cleaner) approach. Nice work :+1:

3 Likes

Nicely done!

2 Likes

Thank you for the demoā€¦ w

2 Likes

Excellent, thanks for sharing!

2 Likes

Hola Darren,

Glad to see my solution gives new ideas to other situations.

Another advantage with it is that you can have quickly the amount of records the filters bring back due to it is working with a relation. Any Rollup pointing to this relation will give you the amount.

I think @kyleheney was looking for something like it weeks ago.

Happy weekend friends!

3 Likes

This is amazing.
Wondering whether itā€™s more lightweight than this method by @Robert_Petitto especially when it comes to multiple filters.

1 Like

Hola Eden!

My original idea was to create a kind of ā€œSQL Queryā€ inside Glide although the big troubles came from playing/working with parameters using an OR operator and AND operator at the same time (a hard challenge sometimes in GDE).

In the end, a Filter is almost a SQL Query when you try to narrow your useful data.

When I ended this idea, I evaluated if this had been a good solution ( a clever idea) or on the contrary, it might create more load/work for Glide (unnecessarily) due to use of template columns changing dynamically along with relations based on them.

To sum up: the endless dilemma between Efficiency vs. Effectiveness when our APP is using this method with a large amount of data: 15k or 20k+ rows :confused:

I donā€™t know at the end whether the best option is to load all data once and let Glide filter and discard values/rows automatically or create/use a dynamic relation to get a specific result always (my idea). Which process is better for Glide? ā€¦ I donā€™t know yet

I read @Darren_Murphy and @Jeff_Hager discuss about this issue here and I agree with some points but I think the friends @Mark or @Jason can give us the final answer to have the best performance on our APPs always.

Have a nice weekendā€¦ feliz fin de semana!

5 Likes

In my experience, filtering any list (whether by condition>relation>inline list OR inline list>condition>filter) is considerably laggy when that condition is built off of an earlier rollup of a datetime.

For example:

Log of categories and dates > relation to self of log categories > rollup of earliest date > if rollup is date then true >filter inline list where if = true.

6 Likes

Question is, in this instance you only have one row with compute columns and then the relation is built on top of them -

Perhaps as it is a single row it uses significantly less resources than if it were lots of rows -
In which case the conventional way of looking at it doesnā€™t apply.

Also wondering whether lots of users using a user specific column then having compute columns like template on top of them (and then a relation) -
How many users Glide can handle

All computations are done on the users device, so Glide can handle it pretty readily when itā€™s a user specific instance

4 Likes

Thatā€™s right!

To me, itā€™s the best way to do this kind of operations and avoid affecting other columns/tables by accident. I just try to use/put a relation where there is no much data (or few columns) involved or associated to that relation and ā€œhelpā€ Glide a bit during the table updating.

Saludos!

2 Likes

The assumption is very sound,
The question is whether itā€™s true, especially with multiple compute columns.

But since itā€™s only a single row with user specific compute - and it doesnā€™t compute the bulk of the data - only this row and pulling the relation columns accordingly - perhaps it can handle much much more -

I was thinking maybe start using this method always.
Instead of having users entering actual screens, just go virtual, like this method.

For instance I Have projects, in this project I have multiple related Tables; ā€œOpeningsā€, ā€œTypesā€, ā€œRecordsā€

Instead of Going into a detail screen of the project and pulling up the related Inline lists, I would just have a virtual screen which pulls up the inline lists -

Therefore I wonā€™t have to build Template/compute columns and relations directly within these Tables which are rather large

@Robert_Petitto what do you think?

1 Like

This works. I do this method at times for one-screen dashboards. Often, as you say, for switching between projects or dates.

example:
CleanShot 2022-01-22 at 18.50.03

1 Like

FantƔstico! This is fabulous - you made my day :pray:

1 Like

Thanks so much for this ā€œtutorialā€ to solve an important challenge!

For my own records, to save time next time I want to create multi-filters like these, Iā€™ve created this short step-by-step document on creating ā€œANDā€ multi-filters using your method.

I share it here in case it may be useful to others:

6 Likes

Thank you, this will be referenced a lot.

Hi @gvalero - this video is incredibly helpful and exactly what I hope to create! Iā€™m very new to glide - we have an app ready to go, but havenā€™t dared touch this filter process because itā€™s extremely intimidating. Iā€™m not sure where to start? We have all of our product data in a google sheet with the different filter values in columnsā€¦ Would you be willing to point me in the right direction for a first step to accomplishing this? THANK YOU so much!

Hola @SLP_Nerdcast , Iā€™m glad to see that my idea is still useful to many people.

I was going to tell you that you can copy my APP demo and check how it was created but Iā€™m noticing that some component or some improvement/change made by Glide broke something and I need to verify and fix it.

But in the meantime, the friend @NunoDel wrote a good step-by-step document to understand my procedure. To be honest, Iā€™m going to use it to remind myself of all the things I did months ago on that APP, thanks Nuno! :wink:

The current caveat with this technique is the number of edits consumed. If you use it in an APP with many signed in users, your edits will affect your paid plan and quota (it can be worse than a Pac-Man). Instead, if your users are Visitors, there is no problem about it.

Your plan B is to use Glideā€™s native filters. When I created this APP demo, Glideā€™s pricing policies were different (there were no edit charges) and advanced filters didnā€™t exist but currently, the situation is better if you want to use their native filters.

Saludos!

1 Like