Handling varying ingredient quantities in recipe database (without junction...?)

#1

I’m working on a recipe production database. I will have a table for all available ingredients, and another table with recipes that uses ingredients. When writing a recipe, i have a linked field where the author can pick ingredients in the recipe table.

Problem is of course specifiying the amounts of ingredients in the recipe. With this method, I can just select what ingredients a recipe contains, not what amount that exact recipe contains of each ingredients.

I was looking for some tips on this in the airtable “recipe organiser”-template.
Here there is a recipe QTY field in the ingredients table – however, in the samples each ingredient is only linked to one recipe. Seems a bit superficial? In my base, same ingredients will be linked to many recipes. Probably the case in most recipe databases. The Recipe QTY field, of course varies between different recipes so the ingreedient cant be re-used ebtween recipes with different amount of say potatoes or cucumber.

Is there any way of doing this, to specify amounts of a specific ingredient from a linked table, without a junction table? or without having separate “ingredient” entries in the ingredient table with same name but different Recipe QTY like in the template? Trying to figure out the most straigthforward way for the author to specify ingredients and amounts at once, without the database getting too cluttered.

If a junction table is a must - is there a form in Airtable that could fill out many tables at once (i.e. add stuff to recipe and recipe-ingredients junctions table), in one view?

The exact amounts will be needed in order to write out the recipe accurately directly from airtable and to calculate prices, on which data is found in the ingredients table. Was thinking of linking different QTY entries between each other WITHIN the same table, unsure how valid a solution this would be.

Would like to hear any solutions or discussion on this!

0 Likes

#2

The short answer is no, you’ll need a junction table if you want to store quantities in any useful matter.

Here’s my personal recipe base, which includes a junction table: https://airtable.com/shrfE9hHqlLbOM4CV/tblZGGje5LFftOppz/viwNXc0tlElIWPxlm?blocks=hide

I’m using a combination of Integromat and CognitoForms to input ingredients for recipes since I can add more than one ingredient at a time this way.

My input form is here: https://www.cognitoforms.com/None1841/RecipeIngredients

My base also includes an unessential but nice to have formula that converts decimals to fractions for “prettier” quantity displays(i.e. “0.125” = “⅛”)

1 Like

#3

Hi, that seems like a neat way of solving this exact same issue.

So you have cognitoforms fill in ingredients and quantities, and make integromat take this data to the junction table, and somehow relate hte ingredients to correct recipes and ingredients found in your airtable?

0 Likes

#4

Yes. My form has a field at the top where I type in the recipe name. If the recipe exists, Integromat adds it to the recipe. If not, Integromat creates a new recipe.

My Airtable includes a formula field in the ´[Recipes]´ table which calculates a link to the form with the recipe name pre-filled in so i dont have to worry about typos.

If i wanted I could have added the other fields related to recipes (step instructions, cook time, source, etc) to the Cognito form. I didn’t, but its not hard to do if you want to add recipes in one fell swoop.

1 Like

#5

Here’s what my Integromat scenario looks like:

1 Like

#6

Hey, thanks for sharing, seems like a smart solution! Did solve this with a recipe-ingredients junction table, and filling in amounts is doable but a bit tedious within airtable but a form solution is probably leaner for a recipe author.

0 Likes