Hello Community, please help to solve in an elegant way!
I have record, and in a field called "FOOD" I have text separated by comma, let's say in the text I have
"FOOD" = Apple, Carrot, sausage
I then have another table caleld "FOOD CATEGORIES" with all the food separated by categories like (Can be a table for each category, same situation):
Apple - FRUIT
Banana- FRUIT
Mango- FRUIT
Carrot - VEGETABLE
Zucchini - VEGETABLE
Potato - VEGETABLE
Sausage- MEAT
Beef- MEAT
Chicken- MEAT
IceCream - DESSERT
Cheescake - DESSERT
Candy - DESSERT
So now I want that in the field next to the field "FOOD" will be a field called "FOOD CATEGORIES" where it will appear the food categories according to the table classification, the previous example, I want to see CATEGORIES FRUIT, VEGETABLE, MEAT
At first I tough I could do with a super concatenation of IF, but seems not very elegant approach.
The real challenge is that in the field food, could be a lot of different items, so I want that the match will be done for all the times, and each categorise will appear only once (In the field I can have 5 different fruit, and 3 differnt meat, I want ot see only one time FRUIT and only one time MEAT)
Any advise on the approach will be very welcome!
Thank you much in advance!