Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Delete attributes from token table to start attribute_ID at "attribute_1" again

  • socius
  • socius's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
5 years 9 months ago #171119 by socius
Hi everybody,

I have a question concerning deleting attributes from a token table:

I created a csv file with my tokentable for upload to the central patricipant database (CPD). The table contains lots of additional attributes.

I played around, changed the table, deleted the CPD and uploaded this table several times. Everytime I also used the CPD to add participants, i.e. fill the token table of one of my surveys and so created the attributes from the CPD also in the token table of this survey.

Now the problem is, that although I deleted the attributes in this survey each time before adding participants from the CPD, the attribute_ID went higher and higher:


Attachment not found




What can I do here? I'd like to delete all the attributes and also start the attribute_ID at attribute_1. Is there a way to do this from the Limesurvey Interface (I still use LS 2.6.7LTS) or would I have to delete these directly from the MySQL-DB?

Thanks for your time!

Best,
G
The topic has been locked.
  • socius
  • socius's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
5 years 9 months ago #171120 by socius
The screenshot got lost in the upload ("Flood Protection"?). Here it is.



Best,
G
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 9 months ago #171141 by DenisChenu
Did you try with : delete token table directly ?

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • socius
  • socius's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
5 years 9 months ago #171186 by socius
Thanks for your response, Denis!

Yes, I deleted the attributes, the whole token table more than once. Everytime I import from the CPD the attribute_IDs increased - now after some import/export/delete its 250+ ;-)

But: I just noticed, that if I manually add attributes to the surveys the attribute_ID starts with attribute_1 again... the solution seems to be to manually create attributes and map these to the CPD (and not create them by copying participants from the CPD to the survey token tables...

Best, G
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 9 months ago #171214 by DenisChenu
You mean
- Auto adding attribute via CPDB : start at 'last done'
- Adding via token attribute management : start at first one

If yes : maybe you can report the issue :)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: socius
The topic has been locked.
  • socius
  • socius's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
5 years 8 months ago #171536 by socius
Hi Denis,

I just reported this issue, s. bugs.limesurvey.org/view.php?id=13893 . Unfortunately the subject was not finished yet - now it's just "2.6.7 LTS" which is not overly informative - sorry. Could someone edit this subject? (I think I can't do this, right?) to: "Via CPDB created attributes: attribute_ID does not start at 1".

Thanks and all the best,
G
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 8 months ago #171553 by DenisChenu
No such fix on 2.6.7 lts …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: socius
The topic has been locked.
  • socius
  • socius's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
5 years 7 months ago - 5 years 7 months ago #172516 by socius
Hi,

about a month ago I had some troubles with attribute_IDs that did not start with "1" even after deleting a token table and all the attributes. After some failed attempts to import tokens with attributes (sometimes it worked, sometimes the fields stayed empty) the attribute_ID started with 200+, but it still worked. (I use LS2.6.7LTS)

Now I have an error I do not want to ignore, a duplicate attribute_ID

<h1>PHP Error [500]</h1>
<p>CDbCommand failed to execute the SQL statement: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'attribute_266'</p>

For a screenshot s. below.

Unfortunately I'd really need the functionality of the CPDB and fill multiple survey token tables with the same respondents + multiple attributes. The question is:
  • Did anybody experience this before?
  • Is that a known bug in LS2.6.7LTS?
  • Could/should I delete the attribute fields directly in the database to start anew with the attribute_IDs (despite the problems with importing)?
  • Was the CPDB improved in more recent versions? I.e. would I have to abandon 2.6.7LTS to get this functionality?

Thanks for your time and help!
Best, G


Last edit: 5 years 7 months ago by socius.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose