Here are the details of the project I'm working on:
- I have an automated email workflow
- The first step of automation is generating a new data extension (DX) based on a filter
- I need to populate an email with data from each row of the filtered DX
- This means looping through each row of the DX
I believe the only way to do this is to add a column to the filtered DX, like
rowNum and then increment each row by 1, so then I can do:
FOR @cnt = 1 TO DataExtensionRowCount("DX")
LookupRows("DX", "rowNum", @cnt)
/* do stuff */
The problem is that I would have to create this new
rowNum column on the fly, either in the email at sendtime OR in a SQL query (not sure ET supports this though). I've tried
UpsertDE() but if that's it then I can't seem to figure out the syntax.
Any thoughts? Let me know if you need any clarification/additional info.