We have created a piece of ampscript that retrieves the images url from a data extension based on the SKU of a product. The SKU is injected in the code. Everything works but the ampscript loads once we move into preview.

Is there a way to force the ampscript to load the content in the editor? I thought potentially with treatascontent function?

1 Answer 1


Ampscript is only rendered during sendtime, and 'Send preview' is mimicking the sendtime behavior without sending. Treatascontent() tells the system to render ampscript nested within, as opposed to treating it as a string. This is useful if you are pulling ampscript dynamically from a DE field.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .