HELP! - How can I have a value in a list, for example

Hey Guys,
I want to know how do you have a value in a list, for example, I’m making an app with a food database, and when you select an item on the list (which I’ve created), it should have a value, e.g I select french fries, and the list says oh it’s worth x calories, and adds it to a total number Is this possible?

at the minimum you need a spreadsheet via airtable or local db that has these columns:

item, unit, calories_per_unit
fries, pc, 0.04 means 1 PC (PIECE) of fries is worth 0.04 calories
beans, oz, 5 means 1 oz (ounce) of beans is worth 5 calories

your app will display the ingredient in an item list built from the item column, but internally you use the corresponding value of the rate from the table when you compute calories.

it implies that your app should specify the actual units required in the recipe of a dish.
(it also means your app should take care of translating one unit to another, if you want it to be flexible. that’s not too hard either if you have a standard routine for unit conversion).
still in the subject of flexibility your app should allow the entry of a factor that will automatically adjust the number of units per recipe depending on expected guests. for example if the recipe is for 4 people and you have 8 people coming, your app should allow a way of adjusting this and should recompute all items and units accordingly.

2 Likes

yes. this is possible.

This is not exactly what you are looking for, but with this simple app you can reference items from one list based upon a choice made in a corresponding list. food/cal lists

what you really want to do is learn to do a VLOOKUP. This is most easily done using a key.
Simple VLOOKUP
Moderate VLOOKUP (only because of the other items and there’s not a written tutorial)