When visitors register for an event through our ET data extension we want to scan through the "All Subscribers" data to see if we already have information on them such as name, company name etc. I tried a LookupRows on All Subscribers where @regEmail matches "Email Address" but it generates an error code.

An unexpected error has occurred!
Error Message: The Data Extension name for a LookupRows function call 
is invalid. A Data Extension of this name does not exist. 
Data Extension Name: All Subscribers Function Call: 
LookupRows("All Subscribers","Email Address",@regEmail) 
Parameter Name: DataExtensionName Parameter Ordinal: 1

How do we LookupRows in the All Subscribers list?

Based on suggestions below I tried: Some(strange)how it seems unable to locate the fields within that list? code:

%%[ SET @skey= "1003123951"
SET @EArows = LookupRows("_Subscribers","Subscriber Key",@skey)
SET @EArow = Row(@EArows,1)
SET @FName = Field(@EArow, "FirstName")
SET @LName = Field(@EArow, "LastName")
Name: %%=v(@Fname)=%%, %%=v(@Lname)=%%

At first I had an error but think I found that, now it should work. Thank you all! Love and Peace etc, etc.

  • Just thought to comment also, the solution provided by jsakas below works perfectly and code above verifies more on usage and testing.
    – Jonny Shaw
    Apr 2, 2014 at 15:22
  • Works - yes. As you are intending - no. Apr 2, 2014 at 15:24

4 Answers 4


You can reference All Subscribers by using name _Subscribers:

LookupRows("_Subscribers","Email Address",@regEmail) 
  • Some(strange)how it seems unable to locate the fields within that list? code:
    – Jonny Shaw
    Apr 2, 2014 at 13:32
  • 1
    @JonnyShaw You can access only limited fields, as the custom field created (like First Name, etc) are unavailable. The colums you have available are here. So yes, you can look up the subscribers, but you cannot access all of the custom attributes created for them. Apr 2, 2014 at 15:21

Try with below code

SET @sub_key = '12346789'

SET @rrObj = CreateObject("RetrieveRequest") 

SetObjectProperty(@rrObj, "ObjectType", "Subscriber")

SET @cObj = CreateObject("SimpleFilterPart")
SetObjectProperty(@cObj, "Property", "SubscriberKey")
SetObjectProperty(@cObj, "SimpleOperator", "equals")
AddObjectArrayItem(@cObj, "Value",@sub_key)

SetObjectProperty(@rrObj, "Filter", @cObj)

SET @ResultSet = InvokeRetrieve(@rrObj)

IF(Rowcount(@ResultSet)>0) THEN       
    SET @row = row(@ResultSet,1)        
    SET @Email_address = Field(@row,"EmailAddress")

I'm pretty sure using _subscribers in the lookup will not work will not work. I tried in my local account. _Subscribers is a View within ET, not a Data Extension. The issue you're facing is that the AllSubs list is a List, not a DE. I would set up a program/automation to run once a day (or more) that consists of a Query Activity that queries the _subscribers view and puts the results in a DE. Then, do a LookupRows against that DE.

You could also use the AMPscript API if using a landing page.

  • 1
    The following code works in one of my accounts: set @SubscriberKey = Lookup("_Subscribers","SubscriberKey","SubscriberID",@SubscriberID) Its a Lookup function as opposed to LookupRows, but it should work the same.
    – Jon Sakas
    Apr 1, 2014 at 17:58
  • 1
    @JonnyShaw This method would allow the users attributes to be available to you. The AMPscript API call would also accomplish what you are doing. Apr 2, 2014 at 15:23

FirstName is not an attribute of _Subscribers.

You can see attributes in https://help.salesforce.com/articleView?id=mc_as_data_view_subscribers.htm&type=5

You must log in to answer this question.

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