I am building a meal planning app. I have the following datatypes:
- Meal Plan Entry with fields like Day of the week, Recipe
- Recipe with fields like Name, Ingredients (list), Quantity (list)
- Shopping List with fields Ingredient, Quantity
Essentially, I want to get the ingredients for each recipe listed in the meal plan and consolidate (remove duplicates) and aggregate the quantities required for the week. While this is fairly easy in SQL, I am stuck in bubble and using backend workflows that are looping through each meal plan entry’s recipe, each recipe’s ingredient, checking if it exists and then adding a thing to the shopping list datatype. This is causing large workload usage.
Is there a simpler way of doing this? Thanks in advance!