1

I'm trying to make a landing page that can return send history details for a subscriber, I can get to the point of having subscriber key, JobID, and EventDate pulling through by running LookUpOrderedRows on the _Sent data view, but if I try to pull in EmailName with a lookup, this returns a NULL - is there a way I can do this, or am I barking up the wrong tree? Code here:

%%[

var @ReturnRows
set @ReturnRows = 0 /* Use 0 to get all results */

var @GetRows
set @GetRows = LookupOrderedRows("ent._Sent",@ReturnRows,"EventDate DESC","SubscriberKey", @SubsKey_Column) /* syntax of LookupOrderedRows */

var @GetRow, @GetRowCount
set @GetRowCount = rowcount(@GetRows)

if @GetRowCount > 0 then /* if search term or criteria matches with the data in the data extension then we will get 1 or more rows*/

var @GetRowNumber
for @GetRowNumber = 1 to @GetRowCount do /* FOR LOOP for each row */

set @GetRow = row(@GetRows,@GetRowNumber) /* calculate row number */

var @JobID_column
set @JobID_column = field(@GetRow,"JobID") /* display value of the column from data extension */

var @SentTime_Column
set @SentTime_Column = field(@GetRow,"EventDate") /* display value of the column from data extension */

var @EmailName_Column
set @EmailName_Column = Lookup("ent._Job", "EmailName", "JobID", @JobID_column)

]%%

Job ID : %%=v(@JobID_Column)=%% | Email Name: %%=v(@EmailName_Column)=%% |Sent Time : %%=v(@SentTime_Column)=%%
<br>

%%[ next @i ]%%

%%[ else ]%%

<!-- If search term does not match with the data for any record in data extension -->
---- No rows found ----

%%[ endif ]%%

This returns the following sample row on my landing page:

Job ID : xxxxxx | Email Name: |Sent Time : 12/5/2017 11:28:35 PM 

1 Answer 1

2

The _Job data isn't recorded at the parent business unit level -- only the business unit in which the send occurs. I'd recommend dropping the ent. prefixes.

3
  • Too fast for me. I was just about to post the same answer, but saw the 'one new answer' alert. Commented Feb 14, 2018 at 14:33
  • Thanks Adam, that works. So, _Job exists at BU level but _Send can be at BU level and Enterprise? It would be ideal to be able to pull in job details for all sends & all BUs, could this be done by sitting the page at Ent level?
    – r0bsta
    Commented Feb 14, 2018 at 22:56
  • That would be nice, but as far as I know, _Job is business unit specific. Commented Feb 15, 2018 at 15:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .