I am using two data extensions, with a primary key in both as Id, first data extension contacts fields as name, email, brand, id. second one contains id, brand, delivers. One name can have more than one delivers. So how to print that? I am getting only one delivers output.

 VAR @Id,@Delivers

Hi %%Name%% <br>

Thanks for showing your interest in our Brand.<br>

Brand = %%Brand%%<br>

The brand you have showed interest in will help you to serve in the below area:


 SET @Id = AttributeValue("Id")
 SET @Delivers = Lookup('Brandonetomany','Delivers','Id', @Id)


%%=v(@Delivers)=%% <br>

this should get you started:

VAR @myrowset,
SET @id = Lookup("myFirstDE","id","id",_subscriberkey)
/*return from myFirstDE the field id, where id == _subscriberkey"*/

SET @myrowset = LookupRows("mysecondDE","Id",@id)
SET @rowCount = rowcount(@myrowset)

IF @rowCount > 0 THEN

FOR @i = 1 TO @rowCount DO

    SET @row = row(@myrowset,@i) /*get row based on loop counter */
    SET @delivery = field(@row,"delivery")
Deliverynumber and value : %%v=(@i)=%%, %%=v(@delivery)=%% <br>



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.