Welcome to the LimeSurvey Community Forum

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

unique values in concatenation of two fields

  • nibos
  • nibos's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 10 months ago #154879 by nibos
I have a field (A) that I want it to have unique values. For that purpose I want it to inherit-display the unique sequential ID of the submitted record that moment plus the 3 four letters of another text field B (substring).

Is it possible?

Thank you.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 10 months ago #154880 by tpartner
Replied by tpartner on topic unique values in concatenation of two fields
What is "field (A)"? Is that a short-text or equation type question? What are the question codes?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • nibos
  • nibos's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 10 months ago #154881 by nibos
"A" is a equation type question. Field "B" is a text field question.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 10 months ago #154882 by tpartner
Replied by tpartner on topic unique values in concatenation of two fields
Try this in the equation question :

Code:
{SAVEDID+substr(B, 0, 3)}

Note: the SAVEDID variable is only available after the submission of at least one group/page.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • nibos
  • nibos's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
6 years 10 months ago #154883 by nibos
Thank you very much
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose