At the top of my newsletter I bring salutation and last name information but I don't want to show the value in Salutation directly. I used below Amscript but apparently it only checks the first value then brings "mevrouw" regardlessly.
Geachte %%[ IF [Salutation] == 'De weledelgeleerde heer'
OR 'De weledelzeergeleerde heer'
OR 'De hooggeleerde heer' THEN ]%% heer
%%[ ELSE ]%% mevrouw %%[ ENDIF ]%% %%Last Name%%,
Can we change this code something like this:
if salutation contains "heer" then bring "heer" else "mevrouw"
Thank you.
I'd recommend using the indexOf AMPscript function. I'd also use an init block to defensively check your raw personalization strings.
Or inline: