Dependent Lists - Products dependent on Product Family

I want to generate product names based on their product family. So if the field called Product Family has the value ‘Dairy’, I want to generate the value ‘Happy Farms Gallon Milk’ or another dairy product. It should never generate ‘bacon’ if the Product family is Dairy, etc.

I’m using a Formula field for Product, but I’m getting a syntax error, here is it


And here is the formula I’m using.
if field(“Product Family”) == ‘Dairy’ then ‘Farm Gallon Milk’ elseif field(“Product Family”) == ‘Meat’ then ‘Prumt Steak’ else ‘OTHER’ end

I’ve tried single and double quotes around the strings, but still get error.
Help?

Mockaroo uses Ruby syntax, so it’s “elsif” instead of “elseif”

1 Like

THANK YOU!

My little eye failed to spy that difference