Help

Re: Ingredient Conversions from cups/tbsp to g

Solved
Jump to Solution
1385 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Julia_Feld
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi all,

I’ve been reading through a ton of different conversations about Airtable and recipe managers. and have found some amazing info on here. I’m currently a little blocked so maybe someone has more info on the following topic.

Overall, I’m trying to create a database that has recipes where I can understand both the cost per recipe and the macronutrient breakdown for each recipe. Where I’m getting stuck is breaking down the nutritional values because some ingredients are in cups and others in tbsp. I’m trying to convert measures to grams but am having trouble connecting the conversion info to the recipe info.

Generally my table is structured as follows:

I have the following tabs within my doc
image
Meals - it’s the meal planning tab
Recipes - this is an overview of the recipes that feed into the meals tab
Recipe Ingredients - this is where the recipes (in the recipe tab) get composed of all their ingredients
Ingredients - this is a master list of different ingredients that cascade up into recipe ingredients and recipes.
Cost calculator - this is where I link ingredients from the ingredients tab to prices and dates of purchase.

Conversion table:
image So this is where I’m trying to add the nutritional value to each ingredient. The issue obviously comes in when a recipe is in cups or tbsp and others are measured in grams. I’m trying to convert all measures to grams so there’s a standard unit. Naturally, the issue comes in when 1 cup of flour obviously weighs less than 1 cup of zucchini. I’ve been manually pulling a lot of information from this database (https://www.nutritionix.com/) where they have a lot of this information so collecting the information isn’t so problematic.

MY QUESTION/ISSUE
What I’m struggling with now though is in the following screenshot
image
I have the ingredients and their measurement, but then, in the table, how do I convert that measure into grams? Is there some way to connect the measurement info in the “Ingredients” tab to this via equation? Am I structuring the whole thing wrong?

Thanks so much!

1 Solution

Accepted Solutions
Julia_Feld
5 - Automation Enthusiast
5 - Automation Enthusiast

In case anyone is wondering, what I’ve done is actually added in an extra tab.

image

Ingredients (CORE) is just a generic list of ingredients
image

this links to Ingredients conversions, which is where all the magic happens. Basically what I’m doing it linking the core ingredient to it’s measured weight info. In the recipes, I’ll use the ingredients from this table as the point to calculate nutrition and cost.
image

Here is the bit around calculating the recipe:
image

Admittedly, it’s not the most elegant solution and certainly requires a lot of upfront manual work to enter the conversion info and the ingredients…but I knew that when I signed up to do this project :slightly_smiling_face:

If anyone runs into a similar issue, I’d be happy to chat about my approach/some trade offs I’ve done (maybe you even have a better one!)

See Solution in Thread

5 Replies 5
Julia_Feld
5 - Automation Enthusiast
5 - Automation Enthusiast

After digging in a bit more, I think my question boils down to if it’s possible to create an equation like an IF equation that pulls back the value of a column rather than a predefined value in the equation. Maybe this is something that can be done in the scripting block?

e.g.

IF(Unit=cup, {1 cup in g}) IF(Unit=tbs, {tbsp in g})

Hi @Julia_Feld,

First, you need to have a Lookup Field that pulls the grams from the conversion table into your recipe table. The current setup you have in the Conversion table will not work, you must have each size as a record not as a field and then pull the relevant gram. Another solution would be to pull all the fields from the Conversion table to the Recipe table with Lookups, but I dont think that is a good idea.

After doing that, you can create an IF formula that changes the tbl spoon or cup to gram.

BR,
Mo

Julia_Feld
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi Mo,

Thanks so much for your response…It’s good to know that’s what you’d recommend since that’s what I actually started to work on myself while I waited to see if anyone had a trick up their sleeve. Good to know I’m not going in a total wrong direction :slightly_smiling_face:

I used to work at a company that has a really complex system for all this and this data structure was unfortunately one of the big data issues they ran into with menu planning…but maybe I won’t have this issue because I’m not as massive of an operation.

Thanks for your feedback again!

Julia_Feld
5 - Automation Enthusiast
5 - Automation Enthusiast

In case anyone is wondering, what I’ve done is actually added in an extra tab.

image

Ingredients (CORE) is just a generic list of ingredients
image

this links to Ingredients conversions, which is where all the magic happens. Basically what I’m doing it linking the core ingredient to it’s measured weight info. In the recipes, I’ll use the ingredients from this table as the point to calculate nutrition and cost.
image

Here is the bit around calculating the recipe:
image

Admittedly, it’s not the most elegant solution and certainly requires a lot of upfront manual work to enter the conversion info and the ingredients…but I knew that when I signed up to do this project :slightly_smiling_face:

If anyone runs into a similar issue, I’d be happy to chat about my approach/some trade offs I’ve done (maybe you even have a better one!)

himg1509
5 - Automation Enthusiast
5 - Automation Enthusiast

Hi @Julia_Feld I'm designing an advanced recipe tool. Would you be able to help me in base design? thanks much in advance.

heman