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)?

More
6 years 9 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.
More
6 years 9 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.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
More
6 years 9 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.
More
6 years 9 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.
More
6 years 9 months ago - 6 years 9 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 support - Plugins, theme and development .
I don't answer to private message.
Last edit: 6 years 9 months ago by DenisChenu.
The topic has been locked.
More
6 years 9 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.
More
6 years 9 months ago #177519 by holch

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

The question is: Why? ;-)

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The topic has been locked.
More
6 years 9 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 support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
More
6 years 9 months ago - 6 years 9 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. ;-)

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
Last edit: 6 years 9 months ago by holch.
The topic has been locked.
More
6 years 9 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 support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
More
6 years 9 months ago - 6 years 9 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.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
Last edit: 6 years 9 months ago by holch.
The topic has been locked.
More
6 years 9 months ago - 6 years 9 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: 6 years 9 months ago by tpartner.
The topic has been locked.
More
6 years 9 months ago #177530 by holch

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

So we are basically sitting on a vulcanoe? because if understand you right, it is extremely dangerous to make any changes, additions, etc. to EM?

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The topic has been locked.
More
6 years 9 months ago - 6 years 9 months ago #177537 by DenisChenu

holch wrote: …it is extremely dangerous to make any changes, additions, etc. to EM?

Some specific update : yes … (maybe not extremely …)

But there are another think : currently all EM data are saved in session, we already have a big session … really big session …

I really think .question (and .help if we add it) must not be in session (i really think 90% of EM session muts not be in session too)
before adding big part in EM, i prefer to update system to have a ligthten session …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
Last edit: 6 years 9 months ago by DenisChenu.
The topic has been locked.
More
6 years 9 months ago #177538 by rikatechdoku

holch wrote: ...
- Subquestion relevance but now answer option relevance. We understand this difference, but for many users subquestions are basically the same as answer options.

Just for the record: This is very true.

As a user, I would have already wished more than once for answer option relevance and certainly do not understand why it is not there (although subquestion relevance is).

(Of course I do understand that LS is open source and therefore awesome that it exists at all the way it does atm. So, no harm meant, I don't want to come across as too critical. You LS developer guys ROCK!!)

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.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose