function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Saikiran KolliSaikiran Kolli 

How to pass two DE's through a AMPSCRIPT

Hi Everyone, 

I'm trying to fetch the data from 2 Data Extensions and inserting into another data extension , below is the code which is not helping. Can anyone help me where I'm doing wrong


%%[ 

set @Subs = AttributeValue('_SubscriberKey')
 set @JobId = AttributeValue('jobID')
 set @memberid = AttributeValue("memberid")
 set @pageURL = RequestParameter("PAGEURL")

 
 Set @lookUp = LookupRows('Page Visits','Subscriber Key', @Subs,'jobid', @jobid)
 SET @variableA  = LookupRows('BU Details','memberid', @memberid)
 
 SET @variableB  = LookupRows('Landing Page Details','CPID',@CPID)

IF Rowcount(@variableA) >0 THEN
   SET @BURow = Row(@lookupvalue, 1)
   Set @BUName = Field(@BURow, 'BUName')
ENDIF 

IF Rowcount(@variableB) >0 THEN
   SET @CPRow = Row(@lookupvalue1, 1)
   Set @CPNAME = Field(@CPRow, 'CPNAME')
ENDIF 
 
 
 IF RowCount(@lookUp) == 0 THEN 
 InsertData('Page Visits','Subscriber Key', @Subs,'jobid', @jobid,'memberid', @memberid, 'BUName', @BUName , 'pageURL', @pageURL,'CPNAME', @CPNAME,'Event Date', NOW())
ENDIF 
 ]%%
Best Answer chosen by Saikiran Kolli
SwethaSwetha (Salesforce Developers) 
HI Sai,
If you are still facing the issue and need further assistance, please reach out to Success - Salesforce Marketing Cloud page on https://success.salesforce.com/_ui/core/chatter/groups/GroupProfilePage?g=0F9300000001pQ5CAI 
 
You can also log a case with salesforce support.
Link: https://help.salesforce.com/articleView?id=workcom_contact_support.htm&type=5 (https://help.salesforce.com/articleView?id=workcom_contact_support.htm&type=5)
 
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful.
 
Thank you
Swetha Maddali