Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Can I reset the {SAVEDID} so it starts again at 1 after I delete all responses?

Can I reset the {SAVEDID} so it starts again at 1 after I delete all responses? 1 year 8 months ago #92669

  • guelphpeter
  • guelphpeter's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 36
  • Thank you received: 1
  • Karma: 0
Hi everyone,
I'm on an older version of LimeSurvey (1.91+ build 11804) but hopefully someone may know how to do this for this version.

I need to reset the {SAVEDID} for a survey, to start again at 1, after I've deleted all the survey's responses. I wonder if someone knows how to do this please?

I've deleted all the survey's responses in its lime_survey_xxxxx database table (where xxxxx is the SID) but when I add a new response to the survey the {SAVEDID} continues incrementing from its last value (i.e. it doesn't get reset to 1 even though I've deleted all responses in the table).

Just wondering if there's another table somewhere where the last value of {SAVEDID} is kept for a survey, or if there's something else I have to do to get {SAVEDID} reset to 1 after I delete all responses.

Thanks in advance for any help and/or suggestions.

Peter
The administrator has disabled public write access.

Can I reset the {SAVEDID} so it starts again at 1 after I delete all responses? 1 year 8 months ago #92681

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6429
  • Thank you received: 839
  • Karma: 249
hello,

Deactivate and reactivate the survey : the survey table are created again, and the counter is set to 0.

Denis
The administrator has disabled public write access.

Can I reset the {SAVEDID} so it starts again at 1 after I delete all responses? 1 year 8 months ago #92682

  • holch
  • holch's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 2838
  • Thank you received: 355
  • Karma: 122
Just out of curiosity, why do you need to reset the ID?
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Question Attributes | Workarounds

If you found this answer helpful and it saved you some time please consider a donation to the project to keep Limesurvey going!
The administrator has disabled public write access.

Can I reset the {SAVEDID} so it starts again at 1 after I delete all responses? 1 year 8 months ago #92689

  • guelphpeter
  • guelphpeter's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 36
  • Thank you received: 1
  • Karma: 0
Thanks for this advice Denis - really appreciated.

I tried it (deactivated survey, then reactivated it) and even though the table was created again the {SAVEDID} continues to increment form its previous value i.e. it does not reset to 1.

Very odd indeed. I'm wondering if the {SAVEDID} is stored in another table somewhere ? I've looked everyone but can't find it. If you have any other suggestions I'd be grateful for what to try next.

Peter
The administrator has disabled public write access.

Can I reset the {SAVEDID} so it starts again at 1 after I delete all responses? 1 year 8 months ago #92691

  • guelphpeter
  • guelphpeter's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 36
  • Thank you received: 1
  • Karma: 0
Hi Holch,

it's a bit complicated to explain.

Basically I need to know in my main survey, what respondent number is taking the survey (i.e. 1st respondent, 2nd respondent, etc.). The "respondent number" is then used in conditions set on various questions so different respondents see different questions. I do this with a token table in this main survey, where the tokens are 1,2,3,4,5,6,.. etc. i.e. I use the "token" as the respondent number, and attribute_1, attribute_2, ... etc. to determine which questions should be shown for this specific respondent. So far, so good.

Where I'm struggling is I have a first and very simple survey, that simply passes its {SAVEDID} to the second survey as the second survey's token. It's this first survey I need to be able to reset the {SAVEID} back to 1 so that after testing is completed it will start invoking the main survey passing in 1 as the first respondent, 2 as the 2nd respondent, etc.

Hope the above makes sense,

Peter
The administrator has disabled public write access.

Can I reset the {SAVEDID} so it starts again at 1 after I delete all responses? 1 year 8 months ago #92692

  • holch
  • holch's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 2838
  • Thank you received: 355
  • Karma: 122
Hmmm, I think I get what you try to do. So in the main survey basically everyone gets different questions (or could get different questions) in terms of in which order they responded the first survey?
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Question Attributes | Workarounds

If you found this answer helpful and it saved you some time please consider a donation to the project to keep Limesurvey going!
The administrator has disabled public write access.

Can I reset the {SAVEDID} so it starts again at 1 after I delete all responses? 1 year 8 months ago #92698

  • guelphpeter
  • guelphpeter's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 36
  • Thank you received: 1
  • Karma: 0
Yes, that's exactly correct - and a great job of interpreting my babbling about what I'm trying to do <grin>

About the only way I know to do this is have the "first survey" tell the "second i.e. main survey" what respondent this is, but passing the "second survey" the {SAVEDID} in the END URL. The "second survey" treats this {SAVEDID} as the token.

Now if I can only figure out how to reset the {SAVEDID} in that first survey <grin>

Peter
The administrator has disabled public write access.

Can I reset the {SAVEDID} so it starts again at 1 after I delete all responses? 1 year 8 months ago #92702

  • Ben_V
  • Ben_V's Avatar
  • OFFLINE
  • Platinum Lime
  • Posts: 1109
  • Thank you received: 250
  • Karma: 78
Hello,
Connect to your LS db using PhpMyAdmin or similar and send the following SQL query:
TRUNCATE TABLE lime_survey_1234
Obviously, replace 'lime_survey' by your correct db_table name...
...and '1234' by your correct survey ID.

Should do the work
Benoît

goo.gl/Bw5iM => Recherche GG dans le forum français (remplacer "exemple" dans la barre de recherche)
goo.gl/WX8PH => GG search for english forum (Replace "example" in the search bar)
goo.gl/IxiGu => Búsqueda en el foro en español (Cambiar "ejemplo" en la barra de...
Last Edit: 1 year 8 months ago by Ben_V.
The administrator has disabled public write access.

Can I reset the {SAVEDID} so it starts again at 1 after I delete all responses? 1 year 8 months ago #92727

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6429
  • Thank you received: 839
  • Karma: 249
guelphpeter wrote:
I tried it (deactivated survey, then reactivated it) and even though the table was created again the {SAVEDID} continues to increment form its previous value i.e. it does not reset to 1
Strange,

And you're right.

But maybe test with :
Deactivate survey
Close browser
Reconnect
Reactivate survey.

Because of EM Session ???

Denis
PS: Ben are rigth
The administrator has disabled public write access.

Can I reset the {SAVEDID} so it starts again at 1 after I delete all responses? 1 year 8 months ago #92735

  • Ben_V
  • Ben_V's Avatar
  • OFFLINE
  • Platinum Lime
  • Posts: 1109
  • Thank you received: 250
  • Karma: 78
Because of EM Session
I don't think so because this behaviour was already present in LS versions anterior than 1.92 (1.90)
way back machine
Benoît

goo.gl/Bw5iM => Recherche GG dans le forum français (remplacer "exemple" dans la barre de recherche)
goo.gl/WX8PH => GG search for english forum (Replace "example" in the search bar)
goo.gl/IxiGu => Búsqueda en el foro en español (Cambiar "ejemplo" en la barra de...
Last Edit: 1 year 8 months ago by Ben_V.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.174 seconds
Donation Image