0

I am trying to fetch some user information from a survey page to a data extension. for this all things are at place and I am redirecting subscriber to a thank you page and capturing this information.

   %%[
var @q5_overallHow5, @q6_didOur6, @q8_wouldYou8, @q10_whatAspect10, @q11_whatAspect, @q12_pleaseExplain, @EmailAddress

set @q5_overallHow5 = RequestParameter('q5_overallHow5')
set @q6_didOur6 = RequestParameter('q6_didOur6')
set @q8_wouldYou8 = RequestParameter('q8_wouldYou8')
set @q10_whatAspect10 = RequestParameter('q10_whatAspect10')
set @q11_whatAspect = RequestParameter('q11_whatAspect')
set @q12_pleaseExplain = RequestParameter('q12_pleaseExplain')
set @EmailAddress = RequestParameter('EmailAddress')


InsertData("SurveyResults",
           "q5_overallHow5",@q5_overallHow5,
           "q6_didOur6",@q6_didOur6,
     "q8_wouldYou8",@q8_wouldYou8, 
     "q10_whatAspect10",@q10_whatAspect10, 
     "q11_whatAspect",@q11_whatAspect, 
     "q12_pleaseExplain",@q12_pleaseExplain, 
   "EmailAddress",@EmailAddress
   )
]%%

This code was working fine but now all of a sudden something's not working as expected and on submit button there is a 500 internal server error.

I have checked all the settings under cloud page and removing this ampscript is allowing me to save and publish the content but I am not able to save and publish after putting this ampscript block.

Please have a look on this page

6
  • 1
    Do you have a primary key on your SurveyResults Data Extension? Any Required/Not Nullable fields?
    – Macca
    May 4, 2017 at 6:52
  • Have you always had those line breaks in the InsertData function?
    – Macca
    May 4, 2017 at 6:54
  • yes, I believe so, I do have a primary key in my DE without it system won't let me save the data extension. "q5_overallHow5" is primary key. This DE is not sendable nor testing. rest of the feilds are set to nullable. Besides there is no required field in my survey form which I have created using HTML. that can be found here pub.s7.exacttarget.com/wethzsthteg/gyu52oslskq May 4, 2017 at 7:51
  • I'm not sure I follow. You can create a Data Extension without a primary key, certainly. And are you trying to insert a value for "q5_overallHow5" that already exists in the table?
    – Macca
    May 4, 2017 at 7:54
  • I have checked and figured out that after removing this inserdata function, page is saving and publishing fine. so I'm not sure what is wrong in this inserdata functio./ May 4, 2017 at 7:55

1 Answer 1

1

@andrew it was just spinning when I was trying to publish this thank you page, after removing this insertdata function saving and publish were working fine. I created a new data extension will all nullable fields and right now it allowed me to save this thank you page. and this works fine now. I/m not sure what was the issue with this Data extension but creating a new data extension with same fields resolved this issue.

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.