Help

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

5540 2
cancel
Showing results for 
Search instead for 
Did you mean: 
JJxyz
5 - Automation Enthusiast
5 - Automation Enthusiast

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!

25 Replies 25

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” = “⅛”)

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?

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.

Here’s what my Integromat scenario looks like: Screen Shot 2019-03-15 at 7.21.40 AM.jpg

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.

Hi JJxyz, David here from Sydney Australia. Might it be possible to share your recipe system? I can’t seem to get my head around junction tables and I’m having the exact issue you initially describe.

Kind regards, David

Hi Kamille, your solution looks so clever! When I copy the base and try to add an item - it doesnt add it via the cognito form… what do I have to do to get them connected?

Kind regards David (from Sydney Australia)

The cognito form is linked to my base. You would have to make your own form and connect it to your copy of my base using Integromat as shown above.

Hi Kamille, firstly thanks for your reply! I created a Cognito Form account and replicated your form (wow what an amazing tool). I connected the form to airtable using my zapier account. I submitted a form but it didnt send the ingredient information… in Zapier when I tried to connect it … it said something like ‘can’t send to a computed/formula field’ (is there something obvious I can fix)… should I try using integromat instead? This is amazing I never thought I would get this far… its almost working