Skip to main content
edited tags
Link
Adam Spriggs
  • 31.1k
  • 6
  • 44
  • 88
added 12 characters in body
Source Link
Gortonington
  • 30.8k
  • 3
  • 27
  • 64

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 |

idcsidmid
1421001
2421002
3451003
4851004
52451005
12451006

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")

]%%

%%[ 

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,

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

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

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,@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
Source Link

Lookup based on result from another lookup

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