Support

Home Forums Event Espresso Premium How do I go into the esp_answer table and delete any records there?

How do I go into the esp_answer table and delete any records there?

Posted: July 15, 2020 at 4:09 pm


tbex

July 15, 2020 at 4:09 pm

Josh mentions this in this post in the forums: https://eventespresso.com/topic/unable-to-editmove-question-following-permanent-deletion-of-all-registrations/

But he does not go into how to access the esp_answer table.

Bottom line, I am trying to edit question types in my registration questions and it will not let me even though this is a brand new event with no registrations.

I keep getting this error: “Because there are currently answers for this question in the database, your options to change the question type have been limited to similar question-types. “


Tony

  • Support Staff

July 16, 2020 at 7:56 am

Hi there,

Modifying the database tables directly is not expected for an end-user so the reason Josh didn’t provide any additional details in that thread is due to the fact that the previous user showed they are already familiar with the database tables.

That user mentioned their esp_registration table was empty, which means they can’t have registrations with relationships to questions/answers because there are no registrations and so its safe to manipulate esp_answer if you know how to.

Bottom line, I am trying to edit question types in my registration questions and it will not let me even though this is a brand new event with no registrations.

So you have no registrations on the site at all that are linked to that question?

The question will lock if ANY registration has been made with a relationship to that question, not per event but on your entire site. To explain a litte:

If you have a question with ID 111 and its type is Dropdown, when you register onto an event that is using that question in one of its groups there are relationships set up to that question and it’s answer, how they relate and how the object is setup within the database determines how the question/answer are generated from that point on.

If we then allowed you to simply change question ID 111 to whatever you want, let’s say a text box, the relationship for all previous registrations linked to that question is now broken. The answer knows it related to question ID 111 and so when it comes to generate the answer using the question type (which in this example was allowed to be changed to a textbox), things break.

So you are welcome to add another question to your question groups in place of that one (if you do that I recommend changing the original question to be admin only), but you can’t modify the exisitng question to be something completely different to what everything else is expecting it to be.

Can you explain what change you are trying to make? From the sounds of it you’ll need to add another question in place of the current one, but if you can add more specifics I’ll let you know more.


tbex

July 16, 2020 at 2:21 pm

Hi Tony,

Thank you. It helps a bit even if it wasn’t the answer I wanted. Your suggestion sounds like a work around. I can add a new question.

All I want to do is change the question type from a text field to checkboxes. We have found we get better responses that way.


Tony

  • Support Staff

July 20, 2020 at 5:04 am

Then yes, you need to add another question in place of the original checkbox question as thats a completely different question/answer relationship. You can not change how a question relates to its answers (as above) so you’ll need to replace it with another.

The steps I posted above aren’t really a workaround as its the expected behaviour for EE’s questions.

So in short:

1. Create your new question as a text question.
2. Edit the question group and add that new question to it, et the ordering as needed to match the current setup if needed.
3. Edit the original question and set it to ‘Admin only’ if you need the current responses to be included for current registrations.

You must be logged in to reply to this support post. Sign In or Register for an Account

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3 Documentation for Event Espresso 4

Status: publish

Updated by  Tony 3 weeks, 1 day ago ago

Topic Tags

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!