1

Having the following Data Extension named "RamiroTest", with just two columns Name and Email DE "EmpleadosTest"

How can I print only the Email column values?

This is the code I have for the moment, but it's not working...

%%[
var @rowCount, @email

set @rowCount  = DataExtensionRowCount("EmpleadosTest")

For @i = 1 to @rowCount do

set @email = Lookup("EmpleadosTest","Email",2,null)

]%%

Email: %%=v(@email)=%%

%%[

Next @i

]%%
4

You are very close to getting it right. So, good job so far. However you need to get your rowcount on LookupRows, instead of the entire DE. Also, to get a specific row, from all rows returned by LookupRows - you need to use Row, and Field to get the specific field from that row. So the solution will be something along these lines:

%%[
var @rowCount, @email, @emailRowsCount
set @emailRows = LookupRows("EmpleadosTest","return","1")
set @emailRowsCount = RowCount(@emailRows)
for @i = 1 to @emailRowsCount do
]%%

Email: %%=Field(Row(@emailRows,@i),"Email")=%%

%%[
Next @i
]%%

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.