Add Unique ID to a Thing

Pretty sure this is very basic and I think I even used to know how to do it. But I’m unable to figure out why I can’t get it to work.

Here’s the setup:

In one table I have a list of ingredients. In another table, I have a list of recipes. I have the ability to associate multiple ingredients with one recipe by saving the unique ID of those ingredients to a field for that recipe. This allows me to view those ingredients when I click on that recipe while also being able to associate those same ingredients with other recipes.

What I’m trying to figure out now is how to ADD ingredients to an existing list of Unique IDs for a recipe. In a repeating group is displayed the list of ingredients. Within each cell is a drop down for selecting a recipe. I then have a save button that should add the unique ID of the ingredient in that cell to the list of unique IDs in the recipe selected in the drop down.

I am struggling to figure out what this work flow looks like. Any help would be appreciated.

Why do you want to add the unique id instead of adding the Ingredient itself to a recipe?

That IS how I add the ingredient to the recipe. The ultimate goal eventually will be to see what recipes are associated with what ingredients. If the ingredient’s unique ID is aced to multiple recipes, I can click that ingredient and see all of the recipes associated with it.

I mean that instead of adding a list of Unique ID, you can add ingredient thing itself. can you share screenshot of DB and you current workflow or list setting?

If I’m being honest, it’s not actually recipes, I just thought it would be simpler to explain it that way. Maybe it isn’t really.

Check out “many-to-many” in the forum search.

Simple way.

Recipe
Ingredients - type Ingredient - is a list

Ingredients
Used In- type Recipe - is a list

Another way (that allows you to have other things like amounts on it)

New table - Ingredient Usage

Ingredient - type Ingredient
Recipe - type Recipe

Recipe
Ingredients - type Ingredient Usage - is a list

Ingredients
Used In- type Ingredient Usage - is a list

This topic was automatically closed after 70 days. New replies are no longer allowed.