Hello,
I’ve been working on a basic recipe style feature for my app. While I have found a clunky workaround, I feel there is a better use of fields that reference other data types that I’m not taking advantage of.
Data Type & (relevant fields):
-
Recipe
(List of Ingredients - Ingredients) - Ingredient
I have a field under Recipe for List of Ingredients. This of course helps me to add/ remove Ingredients to/from a Recipe. My trouble occurs when I want to record the quantity of an Ingredient in any particular Recipe. I don’t want to change a quantity field in the Ingredient because it changes from one Recipe to another.
To get around this I have created an additional data type:
-
Used Ingredients
(Recipe - Recipe)
(Ingredient - Ingredient)
(Qty - Number)
Now, every time I add an Ingredient to my Recipe I create a new Used Ingredient to hold the recipe specific information of that Ingredient.
This will leave me the creation of a lot of redundant things, whose only differentiator is the quantity for a specific recipe. I would love to have the quantity information be stored in a field for Recipe but I cannot think of a way to do that.
Any help is much appreciated.