Quantcast
Channel: Active questions tagged ampscript - Salesforce Stack Exchange
Viewing all articles
Browse latest Browse all 594

Lookup based on result from another lookup

$
0
0

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

idcsidmid
1421001
2421002
3451003
4851004
52451005
12451006

script

%%[ Var @id, @csid, @aidcsid, @idcsid,@mid, @row, @rows,@rowcountSet @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

midcsidlangaddress
100142enaddress in english
100142ptaddress in portuguese
100142itaddress in italian
100194enaddress in english
100194ptaddress in portuguese
100194itaddress in italian

Viewing all articles
Browse latest Browse all 594

Latest Images

Trending Articles



Latest Images