I would like to send an email with 3 different coupon codes inside. I already have an if statement in the amp script that takes them based on the language code, but as it is the voucher code is displayed identical 3 times.
Is there an additional if condition or an iteration (similar to the "LookupOrderRows") that allows me to take different rows of the coupon DE?
My current ampscript is the following:
IF @lang == 'DE' THEN SET @coupon = CLAIMROWVALUE("DE_name","vouchercode","IsClaimed","KeinCode","Id",@id) ELSEIF @lang == 'EN' THEN SET @coupon = CLAIMROWVALUE("DE_name","vouchercode","IsClaimed","NoCode","Id",@id) ELSEIF @lang == 'FR' THEN SET @coupon = CLAIMROWVALUE("DE_name","vouchercode","IsClaimed","PasDeCode","Id",@id) ELSEIF @lang == 'NL' THEN SET @coupon = CLAIMROWVALUE("DE_name","vouchercode","IsClaimed","GeenCode","Id",@id) ELSEIF @lang == 'IT' THEN SET @coupon = CLAIMROWVALUE("DE_name","vouchercode","IsClaimed","NessunCodice","Id",@id) ENDIF
IF @lang == 'DE' THEN
SET @coupon = CLAIMROWVALUE("DE_name","vouchercode","IsClaimed","KeinCode","Id",@id)
ELSEIF @lang == 'EN' THEN
SET @coupon = CLAIMROWVALUE("DE_name","vouchercode","IsClaimed","NoCode","Id",@id)
ELSEIF @lang == 'FR' THEN
SET @coupon = CLAIMROWVALUE("DE_name","vouchercode","IsClaimed","PasDeCode","Id",@id)
ELSEIF @lang == 'NL' THEN
SET @coupon = CLAIMROWVALUE("DE_name","vouchercode","IsClaimed","GeenCode","Id",@id)
ELSEIF @lang == 'IT' THEN
SET @coupon = CLAIMROWVALUE("DE_name","vouchercode","IsClaimed","NessunCodice","Id",@id)
ENDIF