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
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community
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)=%%