I'm looking for a way to limit the number of characters for a dynamic box so if there are more than let's say 300, the text will end with ...
Can this be done through AMPscript?
Thanks for your input! VD
You're probably looking for the Substring() function:
%%[
var @str1, @str2
set @str1 = "1234567890"
set @str2 = iif(length(@str1) > 5, concat(substring(@str1,1,5),"..."), @str1)
]%%
@str2: %%=v(@str2)=%%
Output:
@str2: 12345...