Filter RG via other table

Hi all, I can’t seem to wrap my head around this. Was hoping someone can give me some direction.

I’ll start with some context.

I have an RG for courses that pulls all courses in my courses table.

In that table, I have some fields that I’m already filtering with search, dropdown, and multi-dropdown.

The challenge I’m facing is that I want to add a filter for courses that are free. I already have the custom state built and that works fine.

My price table has a relationship with courses, but my courses table doesn’t seem to have one with my price table.

How can I make the free filter work within my RG?

Thanks in advance for the help!

currently you could use the advanced filter and use do a search for prices where course is this course.

however in an app you want to a) avoid :filtered b) avoid advanced filter and c) avoid a search within a filter like I just suggested. c at all costs. b and c also as at scale (already above 100) it gets slower and slower.

hence the best way is to change your database such that price is free is a yes/no or field type number (if price can be 15 or 30 or 0) on your course datatable.

so skill should also be in the course table.

or did you upload all this data?

in this case use a recursive workflow on all data to change it as shown here. (need paid bubble plan)

I’ll give that a try.

To answer your questions:

hence the best way is to change your database such that price is free is a yes/no or field type number (if price can be 15 or 30 or 0) on your course datatable.

I’m happy to change how the db works in order to ensure it also performs well. However, a single course might have multiple prices.

I need to make sure that I can have multiple prices submitted.

Maybe it can be a backend workflow that changes a Free (yes/no) field at the course level?

Skill is its own table AND listed in each course.

I’m not sure why the same isn’t working for price.

or did you upload all this data?

I added all of this manually via an admin panel I created.

I’ll check out your video.

if the list is short you can use a list of numbers
eg each course has a list of prices 30€, 50€ and 100€. Or is your app more complex than that?

At scale i recommend to have lots of yes/no fields updated via triggers on the datatype that is shown on your front page search as yes/no has the least amount of data per row so even 10 of them is less data than a list of texts

edit please make a screenshot of your course datatype.
not sure why what you say is working with skill is not working with price
did you join the data correctly?

The app is more complex as it’s an aggregator and the course creators are the ones that define the prices. There are also several variables for each course/price.

Some courses have payment plans, some courses have monthly payments, others are quarterly, annually, etc. Even if the amount is the same, the payment terms would be different.

If I understand correctly, I should have a free yes/no field in the courses table that gets updated based on whether a new price is created as free.

If that’s the case, I just have to figure out how to do that.

if you are paying 130 a month you can use backend triggers. how to here: Tutorial: Database Trigger Events - YouTube

without paying that much you can add a step whenever you add a new price that is change this course to make its price contains free yes / no.

sorry it seems like i am plugging my content here, i am not. i would link other videos too if relevant and have done so many times.

This topic was automatically closed after 70 days. New replies are no longer allowed.