We have a monthly newsletter for a product interest group. We would like to use a data extension to store email content (subject line, preheader, etc.) that can be used. Within the data extension there is a date field to mark when the email content was used, before the email is sent this field is left blank.

The email content DE has been set up as not sendable or testable. Can someone advise on how to use ampscript to ensure each row in the data extension is only used 1x. Each row contains email copy for 1 send.

To retrieve email content: This is what I was thinking...

%%[ var @subjectline, @preheader,

set @subjectline = Lookup("ContentDEName", "subjectline", "Date") set @preheader = Lookup("ContentDEName", "preheader", "Date",) ]%%



To mark date used:

  • you need to retrieve the subjectline and preheader column values based on date field ?
    – Ravi.A
    Commented Jul 4, 2018 at 5:57

1 Answer 1


@Amanda Record try like this

 VAR @lookUp,@subjectline, @preheader, @email, @from_row

 set @date= "baesed on  date value it will retrieve"

 Set @lookUp = LookupRows("ContentDEName","Date",@date)

 IF RowCount(@lookUp) > 0 THEN 

 SET @Count = RowCount(@lookUp)

 FOR @i = 1 to @Count DO

  SET @from_row = Row(@lookUp,@i)
  SET @subjectline = Field(@from_row,"subjectline")
  SET @preheader = Field(@from_row,"preheader")
   NEXT @i


You must log in to answer this question.

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