I have a table that returns MID based on a concat of id and csid that are in my list. This works as it should.
Can I use the mid to do a lookup on another data extension to return an address? If so, how do i do it?
Table 1
idcsid | mid |
---|---|
142 | 1001 |
242 | 1002 |
345 | 1003 |
485 | 1004 |
5245 | 1005 |
1245 | 1006 |
script
%%[
Var @id, @csid, @aidcsid, @idcsid,@mid, @row, @rows,@rowcount
Set @id = AttributeValue("id")
Set @csid = AttributeValue("csid")
Set @aidcsid = Concat(@id,@csid)
Set @rows = LookupRows("mid", "idcsid", @aidcsid)
set @rowCount = rowcount(@rows)
if @rowCount > 0 then set @row = row(@rows,1)
set @decid = field(@row,"mid")
]%%
That works as it should.
I want to have another Data Extension that I can lookup based on mid. Is this possible?
mid = the derived value based on the previous lookup
csid = attribute value
lang = attribute value
addy = The field I need to return,
So the lookup will be on a concat of mid, csid, lang and then it returns addy.
Table 2
mid | csid | lang | address |
---|---|---|---|
1001 | 42 | en | address in english |
1001 | 42 | pt | address in portuguese |
1001 | 42 | it | address in italian |
1001 | 94 | en | address in english |
1001 | 94 | pt | address in portuguese |
1001 | 94 | it | address in italian |