function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
CRM WEEKENDESKCRM WEEKENDESK 

How to jump to another row in amscript ?

Hello community !

I have an email which send abandoned cart of clients.
Besides that I'd like to put recomendations using ampscript on some other products to my client according to where they live.
However I don't want to push in the recomendations a same product that was in the abandoned cart.
In ampscript I am able to skip the line (doesn't display anything) but instead of skipping the line I'd like to jump to the next line where the product name is different so I still have the same number of recomendations.

As anyone experience that before and could help me with ampscript please ?

Thanks
Joanna
Tej PalTej Pal
Hi Buddy,

You can use the replace() (https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-programmatic-content.meta/mc-programmatic-content/Replace.htm) AMPScript function.

Sample
%%[

var @copyText, @copyTextAdj
set @copyText = AttributeValue("copyText")
set @copyTextAdj = replace(replace(@copyText ,char(13),""), char(10),"<br/>")

]%%
Original:%%=v(@copyText)=%%
<br>Adjusted: %%=v(@copyTextAdj)=%%
If this answers your question mark Best Answer it as solution and then hit Like!