I've basically prepared an HTML form on one landing page and On a second landing page I'm getting the data from the first. All of this is working. Now I want to retrieve the record of customer who has recently entered his email in the first landing page HTML Form. Basically to see If the customer record with same email address already exists.

Also, I don't know if this is required or not but the EmailAddress in the DE is the Primary Key which relates to subscribers on sub key.

<script runat="server">
     var DE = DataExtension.Init("SanskarPreferenceDE");
      var FirstName = Request.GetFormField("FirstName");
      var LastName = Request.GetFormField("LastName");
      var EmailAddress = Request.GetFormField("EmailAddress");
      var filter = {Property:"EmailAddress",SimpleOperator:"equals",Value:EmailAddress};
      var data = DE.Rows.Retrieve(filter);

This is the code I'm using. Here, SanskarPreferenceDE is the External Key of the DE. Please let me know what can be done since I'm a complete noob to this technology for now. Also, I've tried to retrieve the fact that Data extension is getting initiated. For this I did


and on the preview page im getting this


Is it correct? Please guide.

  • As a note, I ran your code through with Rows.Retrieve (as you showed in your post) and it ran without error. I saw you solved it by going down another route, but wanted to share. – Gortonington Apr 19 at 13:02
  • Oh and the preview page limits the functionality - so do not go by what is displayed there as the final output as for instance, the preview shows that Rows.Retrieve does not exist (the error you are seeing), but once you publish the page, it works. – Gortonington Apr 19 at 13:06
  • 1
    Thanks @Gortonington, I was trying it with the help of retrieve again today and saw your comments, tried to work with it after publishing and ignoring the exception and it worked. Earlier I thought if there was an error on preview page It won't work. Thanks! – Sanskar Vaidya Apr 21 at 7:03

I solved this easily by using rows.Lookup instead of rows.retrieve .


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.