# Create Loop

Hi, newbie here. I would like to create a loop to enter ingredients for a food cost calculator.

Using a Rowlink to fill ingredients to fill all the required items but would like a way to add more if the fields are filled for longer recipies.

In the attached sample, Colum D - H (Ingredient 1 Items) would repeat until the recipe is completed

Welcome to the community and thanks for posting here!

It’s really awesome to hear you are building a food cost calculator. To help you create a flow where you can add multiple ingredients for one recipe, you may want to update your table set up. I’ll use your drink mixing theme for my example.

1.) Create a table that lists the names of the drinks that you want to create

2.) I also created another table for different unit measures to ensure users only use my specified measures

3.) For the third table, I created a table that lists the drink ingredients that recipes would need

4.) For my last table, this is where all the ingredients for each recipe will be inserted (joining the drink recipe name and drink ingredients tables together). The idea here would be to create an app screen where you can enter in an ingredient and unit quantity for a recipe. If you have multiple ingredients, then in app you can create a flow of “adding another” so users can enter another. Every row in this table will represent one of the ingredients needed in the recipe.

Note: in my example I created a formula to calculate cost for me. This is the formula I used =[Unit Qty]*[Ingredient][Cost Per Unit] . Further down the line when you build your app you can create a filter that filters the table below for the recipe the user wants a calculation for and then sum the cost column. My recommendation here would be to insert data in your table based on 1 serving and then have your app users specify how many servings they want to calculate for and create a simple multiplication formula in app to show the cost.

Let me know if this helps or if you have further questions. I’m happy to help!

Thanks,
Matt