Dynamic Nested List Filters (Does Not Contain)

Hi Adalo Community! I am building a marketplace app and am stuck finding a solution to this issue:

App Overview: Similar to a DoorDash app (minus the delivery piece), so basically there are 2 types of users: Customers and Restaurants. It’s a niche restaurant category and we (the marketplace) will manage the possible list of food options (ex: hamburger, hot dog, chicken sandwich). For each food option, we (the marketplace) will also have a list of add ons (For Hamburger: tomato, lettuce, etc. – For Hot Dog: onions, peppers, etc). When a new restaurant signs up, they will be able to select the food options they offer (maybe hamburger and chicken sandwich, but not hot dog). For each selected food option, they then can add custom prices for the add ons (the tomato, lettuce, etc).

My Collections:
Products:

  • Hamburger
  • Hot Dog

Product Add Ons (relation to Product Options):

  • Hamberger > Lettuce
  • Hamberger > Tomato
  • Hot Dog > Onions
  • Hot Dog > Jalapeños

Seller Products (relation to Product Options & Seller & includes base Price field):

  • Resturant A > Hamberger > Base Price: $5
  • Resturant B > Hamberger > Base Price: $7
  • Resturant A > Hot Dog > Base Price: $3

Seller Product Add Ons (relation to Seller Product Option & Product Option Add Ons & includes add on Price field):

  • Resturant A > Hamberger > Lettuce > Price: $2
  • Resturant A > Hamberger > Tomato > Price: $1
  • Resturant B > Hamberger > Lettuce > Price: $0.5
  • Resturant B > Hamberger > Tomato > Price: $1.5
  • Resturant A > Hot Dog > Onions > Price: $1
  • Resturant A > Hot Dog > Jalapeños > Price: $2

The Problem: I am able to get all the way to the point where the Seller Product is added to the Restaurant. Then I show the Restaurant a list of the Product Add Ons. When they click on, it shows a form and a new Seller Product Add On is created for the Restaurant’s Product (ex: adding lettuce to Resturant A’s hamburger will add $2 to the price). That’s perfect and what I am looking for. The problem is arising when I then try to show that list of Add Ons again, because once the first Add On is created, then there is 1 Seller Product Add On that needs to be shown and all Product Add Ons for that Product MINUS the Product Add On that now has a Seller Product Add On associated to it.

Currently, I had two lists on the “Add On” screen. One for a list of Product Add Ons for the Product and one list of Seller Product Add Ons for the Seller Product. The second list is working great. I can’t figure out how to dynamically remove the Product Add Ons where the Seller Product already has a Seller Product Add On for. I feel like this should be a simple (or at least moderately simple) filter, but I can’t seem to figure it out. Any help is very appreciated!

Hi @th_for_tg ,

It is easier to see the issue from inside, but this will need to be paid service, because it will take some time to understand the relationship first and your actions with that.

DM me, if it is possible for you.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.