I'm struggling a little with a lookup table.
so I have a list. List has country and language columns
I also have an exception table that has country and language columns.
I am trying to say, If Country = Germany in my list and Country Germany is found in the lookup table, then Set the language to whatever the value is in the lookup table, else just use the values from the list if Country is not found in the exception table
%%[
Var @excepcount, @exceplang, @count, @lang, @row, @rows, @country,@language, @rowcount
Set @count = AttributeValue("country")
Set @lang = AttributeValue("language")
Set @rows = LookupRows("exceptions", "country", @count)
set @rowCount = rowcount(@rows)
if @rowCount > 0 then
set @row = row(@rows,1)
set @exceplang = field(@row,"language")
set @excepcount = field(@row,"country")
else
Set @exceplang = AttributeValue("language")
Set @excepcount = AttributeValue("country")
endif
]%%