Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: LS 2.00+: Referencing multiple choice subquestion with SGQA notation

LS 2.00+: Referencing multiple choice subquestion with SGQA notation 1 year 10 months ago #87541

I'm trying to do a count of the amount of checkboxes that were checked in a previous multiple choice question.

Here's my syntax: {count(555824X11X93_A,555824X11X93_B,555824X11X93_C)}

But I'm getting an undefined variable error.

Any suggestions? I cannot use qCode notation because it's in a different group.

Thank you
I'm a call centre and market research technology consultant, lead/sample provider, and panel broker.

I'm also the co-founder and former IT Director of Winning Research Ltd. - LimeSurvey helped the company become a multi-million dollar company within just a few years!
The administrator has disabled public write access.

Re: LS 2.00+: Referencing multiple choice subquestion with SGQA notation 1 year 10 months ago #87544

  • floccs
  • floccs's Avatar
  • OFFLINE
  • Senior Lime
  • Posts: 47
  • Thank you received: 5
  • Karma: 2
use count(that.Q_CODE.NAOK) to count all the checked answer in question Q_CODE

use count(that.Q_CODE.sq_A.NAOK,that.Q_CODE.sq_B.NAOK,that.Q_CODE.sq_C.NAOK) to count the checked answers between subquestions A, B, C of question Q_CODE
The administrator has disabled public write access.

Re: LS 2.00+: Referencing multiple choice subquestion with SGQA notation 1 year 10 months ago #87545

floccs wrote:
use count(that.Q_CODE.NAOK) to count all the checked answer in question Q_CODE

use count(that.Q_CODE.sq_A.NAOK,that.Q_CODE.sq_B.NAOK,that.Q_CODE.sq_C.NAOK) to count the checked answers between subquestions A, B, C of question Q_CODE

The problem is that qCode can't be used since the checked answers I'm trying to count are part of a multiple choice question in another Group, and hence cannot be referenced by qCode (as far as I was able to figure out).
I'm a call centre and market research technology consultant, lead/sample provider, and panel broker.

I'm also the co-founder and former IT Director of Winning Research Ltd. - LimeSurvey helped the company become a multi-million dollar company within just a few years!
The administrator has disabled public write access.

Re: LS 2.00+: Referencing multiple choice subquestion with SGQA notation 1 year 10 months ago #87546

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
Qcode can be used anywhere. The EM engine does all variable processing- SGQA is now just an alias for qcode.
The administrator has disabled public write access.

Re: LS 2.00+: Referencing multiple choice subquestion with SGQA notation 1 year 10 months ago #87547

TMSWhite wrote:
Qcode can be used anywhere. The EM engine does all variable processing- SGQA is now just an alias for qcode.

So then how does one reference either of GROUP1>>Q1 or GROUP2>>Q1 ?

Both technically have the same qCode, don't they?
I'm a call centre and market research technology consultant, lead/sample provider, and panel broker.

I'm also the co-founder and former IT Director of Winning Research Ltd. - LimeSurvey helped the company become a multi-million dollar company within just a few years!
Last Edit: 1 year 10 months ago by spacejanitor.
The administrator has disabled public write access.

Re: LS 2.00+: Referencing multiple choice subquestion with SGQA notation 1 year 10 months ago #87548

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
Qcodes must be globally unique for the survey. You cannot use Q1 as the name of two different questions.
The administrator has disabled public write access.

Re: LS 2.00+: Referencing multiple choice subquestion with SGQA notation 1 year 10 months ago #87550

TMSWhite wrote:
Qcodes must be globally unique for the survey. You cannot use Q1 as the name of two different questions.

Sure you can. The qCodes don't appear to be declared globally.

You can have a Q1 in Group1 and a Q1 in Group2.

In order to reference qCodes outside of their group, they would need to be declared globally and be unique to the whole survey, which currently they appear not to be. Either that, or there needs to be a prefix identifier for the group first, before the qCode, like {group}.{qCode}
I'm a call centre and market research technology consultant, lead/sample provider, and panel broker.

I'm also the co-founder and former IT Director of Winning Research Ltd. - LimeSurvey helped the company become a multi-million dollar company within just a few years!
The administrator has disabled public write access.

Re: LS 2.00+: Referencing multiple choice subquestion with SGQA notation 1 year 10 months ago #87552

TMSWhite wrote:
Qcodes must be globally unique for the survey. You cannot use Q1 as the name of two different questions.

TMSWhite, if you have some time to troubleshoot and debug with me this week, my week is wide open so maybe we can look at some of these issues together.

I'm not much of a developer but I will certainly help you out in any way I am capable :)
I'm a call centre and market research technology consultant, lead/sample provider, and panel broker.

I'm also the co-founder and former IT Director of Winning Research Ltd. - LimeSurvey helped the company become a multi-million dollar company within just a few years!
The administrator has disabled public write access.

Re: LS 2.00+: Referencing multiple choice subquestion with SGQA notation 1 year 10 months ago #87553

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
If you use global qcodes you will be fine. I added in backwards compatible support for re-used qcodes, but i am strongly recommending that support for reused qcodes be phased out. If you look at the logic file you will see that reused qcodes are marked as warnings.
The administrator has disabled public write access.

Re: LS 2.00+: Referencing multiple choice subquestion with SGQA notation 1 year 10 months ago #87554

TMSWhite wrote:
If you use global qcodes you will be fine. I added in backwards compatible support for re-used qcodes, but i am strongly recommending that support for reused qcodes be phased out. If you look at the logic file you will see that reused qcodes are marked as warnings.

Thanks for the clarification, TMSWhite.

I think I was mistaken because sometimes when question modifications are saved, the question "GUI" (the interface you see immediately after editing a question) shows the variable highlighted in red and "Undefined variable" displayed, even when the QA file may be valid.

It seems to be randomly that this happens, although generally immediately after saving a change. It might be that there is some lag in my database to pull the changes.

I'll run some more tests shortly and let you know of anything else :)
I'm a call centre and market research technology consultant, lead/sample provider, and panel broker.

I'm also the co-founder and former IT Director of Winning Research Ltd. - LimeSurvey helped the company become a multi-million dollar company within just a few years!
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.129 seconds
Donation Image