I have DE lists like this for "Fruits" category:
"Apple", "Apple A", "Apple 2", "Apple red", "Apple green", "Apple CA", "Mango", "Mango Lala", "Mango B", "Mango White", "Mango special", "Mango yes" etc
And for "Year" category:
"2023", "2024", "2025", so on
Basically, I want to show if the fruits name is listed and year is correct then it would specific link, otherwise if fruits name not within in that category and year less than 2023 then it would show default link.
My code:
var @lookupValue set @lookupValue = [Fruits] SET @Fruits= [Fruits] set @Year= [Year] SET @LinkDefault = "google.com" if IndexOf(Fruits,'Apple') > 0 or IndexOf(Fruits,'Apple red') > 0 and @Year >= 2023 then SET @LinkSE = lookup('FruitsJourney_Links', 'LinkHero' ,'Fruits', @lookupValue) SET @Link1 = lookup('FruitsJourney_Links', 'Link1' ,'Fruits', @lookupValue) SET @Link2 = lookup('FruitsJourney_Links', 'Link2' ,'Fruits', @lookupValue) SET @Link3 = lookup('FruitsJourney_Links', 'Link3' ,'Fruits', @lookupValue) elseif IndexOf(Fruits,'Mango') > 0 or IndexOf(Fruits,'Mango red') > 0 and @Year >= 2023 then SET @LinkSE = lookup('FruitsJourney_Links', 'LinkHero' ,'Fruits', @lookupValue) SET @Link1 = lookup('FruitsJourney_Links', 'Link1' ,'Fruits', @lookupValue) SET @Link2 = lookup('FruitsJourney_Links', 'Link2' ,'Fruits', @lookupValue) SET @Link3 = lookup('FruitsJourney_Links', 'Link3' ,'Fruits', @lookupValue) else @Fruits != [Fruits ] and @Year <= 2022 then SET @LinkSE = @LinkDefault SET @Link1 = @LinkDefault SET @Link2 = @LinkDefault SET @Link3 = @LinkDefault endif I think my condition is correct, however,the default link doesn't work, can anyone check what is the issue with my code?
Thanks.
@lookupvalueand@ModelYearvariables have not been set, at least not in the piece of code you provided