Welcome to the LimeSurvey Community Forum

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

What ist the Qcode for the main question (not subquestion)?

  • rikatechdoku
  • rikatechdoku's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 years 4 months ago #177506 by rikatechdoku
Hello,

In a question I want to reference the main question string of a previous question.

I thought it should be possible with
Code:
Qcode.question
but with the help file I can only figure out the Qcode for subquestions.

Is there a Qcode for the main question (not a subquestion)? If so, how does it look or else how can I reference the main question string of a previous question?

Thx & regards, S.

I'm using the hosted LimeSurvey Pro version (at least 3.15) on LS servers, AND also the locally installed xampp version as well (at least 3.15).
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 4 months ago #177508 by holch
No, it seems that for those questions, that do have subquestions, you can not get the question text. I stumbled over that as well before.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • rikatechdoku
  • rikatechdoku's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 years 4 months ago #177509 by rikatechdoku
Ok, thx for the info.

I'm using the hosted LimeSurvey Pro version (at least 3.15) on LS servers, AND also the locally installed xampp version as well (at least 3.15).
The topic has been locked.
  • rikatechdoku
  • rikatechdoku's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 years 4 months ago #177512 by rikatechdoku
just brain storming:

I tried that.qname.question but it gives me the question string of the "other" option and that.qname.sgqa gives me "831328X7X136other". So, that.qname.suffix was a good try but did not do the job either at the end.

Has anyone else have found a work-around or solution which we here did not think of yet?

thx, regards, S.

I'm using the hosted LimeSurvey Pro version (at least 3.15) on LS servers, AND also the locally installed xampp version as well (at least 3.15).
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 4 months ago - 5 years 4 months ago #177515 by DenisChenu
The question text of an array (or multiple question ) are not in Expression Manager.

The only workaround:
1. Create an hidden Text display question (name QCodeText)
2. In QCode text put {QCodeText.question}

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.
Last edit: 5 years 4 months ago by DenisChenu.
The topic has been locked.
  • rikatechdoku
  • rikatechdoku's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
5 years 4 months ago #177517 by rikatechdoku
Thx, Denis, that works. With this workaround there is only 1 place in which to edit the string, if wanted. It's not perfect, but at least it works. Thx.

I'm using the hosted LimeSurvey Pro version (at least 3.15) on LS servers, AND also the locally installed xampp version as well (at least 3.15).
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 4 months ago #177519 by holch

The question text of an array (or multiple question ) are not in Expression Manager.

The question is: Why? ;-)

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 4 months ago #177522 by DenisChenu

holch wrote:

The question text of an array (or multiple question ) are not in Expression Manager.

The question is: Why? ;-)

Because there are no value entered by user related …

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.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 4 months ago - 5 years 4 months ago #177524 by holch
]The question text is there: It is stored somewhere in the database, just like for any other question type (otherwise LS couldn't display the question).

So why shouldn't we be able to use Qcode.question and get the text of the question out of the database, just like for other question types?

I guess the initial idea was that no one needs this code, because it is more or less "static". However, this assumption has proofen wrong, long ago in my opinion. There are moments where it is good to access the question text. I had the case myself before and as I can see here, I am obviously not alone. ;-)

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Last edit: 5 years 4 months ago by holch.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 4 months ago #177526 by DenisChenu
Expression manager was done to get answer of user … You answer {QCODE.NAOK}
Then no answer => no code …

.question is added during developement

And really : ading it in core can broke completely expression manager …

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.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 4 months ago - 5 years 3 months ago #177528 by holch
I am just saying that it would be nice to be able to access the question text for all question types, not just for some. It is hard to explain to users why for some it works, for others not. Just like some other concepts that are not very consistent in LS:
  • {TOKEN:ATTRIBUTE_1} vs {ATTRIBUTE_1}, we both just had this one this week in the forum.
  • Why we have to use {} for expressions, but can't use them in relevance equations (was solved visually in the backend showing the symbols { } already.
  • Subquestion relevance but now answer option relevance. We understand this difference, but for many users subquestions are basically the same as answer options.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Last edit: 5 years 3 months ago by holch.
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 4 months ago - 5 years 4 months ago #177529 by tpartner

And really : ading it in core can broke completely Expression Manager …

Yup, the most temperamental animal ever! :)

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 5 years 4 months ago by tpartner.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose