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)
IF ROWCOUNT(@EArows) == 1 THEN
SET @EArow = Row(@EArows,1)
SET @FName = Field(@EArow, "FirstName")
SET @LName = Field(@EArow, "LastName")
ENDIF ]%%
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.
Attribution to: Jonny Shaw
Possible Suggestion/Solution #1
You can reference All Subscribers by using name _Subscribers:
LookupRows("_Subscribers","Email Address",@regEmail)
Attribution to: Jon Sakas
Possible Suggestion/Solution #2
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.
Attribution to: Timothy
Possible Suggestion/Solution #3
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
Attribution to: Iñaki Hernando Urcullu
Possible Suggestion/Solution #4
Try with below code
SET @sub_key = '12346789'
SET @rrObj = CreateObject("RetrieveRequest")
SetObjectProperty(@rrObj, "ObjectType", "Subscriber")
AddObjectArrayItem(@rrObj,"Properties","SubscriberKey")
AddObjectArrayItem(@rrObj,"Properties","EmailAddress")
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")
ENDIF
Attribution to: Dorjee Karma
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/31527