Welcome to the LimeSurvey Community Forum

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

Populate CPDB from another database table

  • OpenStudio
  • OpenStudio's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 months 6 days ago #253757 by OpenStudio
Populate CPDB from another database table was created by OpenStudio
Goodevening everyone,

I was wondering if it is possible to populate the CPDB from another users table I already have in my database.
The email field, which is encrypted in the database lime table, is not a problem because we figured out how to encrypt/decrypt this text.

The question is more about the column participant_id, to understand how that ID is generated - so that I can try to generate one on my own for each user I add via database.

Do you have any idea?

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 months 6 days ago #253797 by DenisChenu
Replied by DenisChenu on topic Populate CPDB from another database table
One of my customers fills it in with the identifier of his other database.
Warning: it must be a unique code attached to this participant, and as this code is used in HTML as an id: it must not start with a number (breaks the JS).

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: OpenStudio

Please Log in to join the conversation.

  • OpenStudio
  • OpenStudio's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 months 5 days ago #253801 by OpenStudio
Replied by OpenStudio on topic Populate CPDB from another database table
Oh I see, so it only has to be unique - it doesn't have to follow the same pattern of the auto-generated ones?
Code:
a1b2c3d4-a1b2-a1b2-a1b2-a1b2c3d4e5f6

Please Log in to join the conversation.

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 months 5 days ago #253802 by DenisChenu
Replied by DenisChenu on topic Populate CPDB from another database table
Not,
Just unique and avoid space : developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id

About start by number : maybe it's OK now ?
Or start by # (and jquery didn't like #)

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: OpenStudio

Please Log in to join the conversation.

  • OpenStudio
  • OpenStudio's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 months 5 days ago #253806 by OpenStudio
Replied by OpenStudio on topic Populate CPDB from another database table
Great thanks!
I tried to generate a unique id following the same pattern 8-4-4-4-12

JUst wanted to be sure it can be any string!

Thanks a lot, it is solved!

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose