Welcome to the LimeSurvey Community Forum

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

Referencing an answer using SGQA

More
15 hours 5 minutes ago - 14 hours 18 minutes ago #268947 by Howdy
Referencing an answer using SGQA was created by Howdy
Please help us help you and fill where relevant:
Your LimeSurvey version: 6.3.4
Own server or LimeSurvey hosting:
Survey theme/template: Fruity
==================
I'm attempting to present the answer from one question to a subsequent question. This should be super easy but reading through the manual and searching the forum didn't give me a solution that worked (probably user error!).

Q1 is type: Input on demand where the respondent can enter multiple text entries. These subquestions are given the Code of the format: Q1B1, Q1B2, Q1B3, etc.
Q2 is type: Ranking advance and asks the respondent to rank order their entries from Q1. For the answer options, I'm using SGGQA format.  In this case, my surveyID = 822541, groupID = 91, questionID = 1503, answerID = Q1_Q1B1. I got those IDs from the Survey Logic View table. So, for the first answer option I use in Q2: {822541X91X1503XQ1_Q1B1}
But when I preview the survey, I just see a list of items in the format: {822541X91X1503XQ1_Q1B1} as opposed to what answers they had entered in Q1.

Please let me know what I'm doing incorrectly. Thank you!
Last edit: 14 hours 18 minutes ago by Howdy. Reason: typo

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
14 hours 18 minutes ago - 14 hours 17 minutes ago #268948 by Joffm
Replied by Joffm on topic Referencing an answer using SGQA
Hi,

For the answer options, I'm using SGGQA format

Why do you do this?
You should use ExpressionScript?
 

And the array filter of Q0b on Q0a
 

Joffm

 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 14 hours 17 minutes ago by Joffm.

Please Log in to join the conversation.

More
12 hours 40 minutes ago #268950 by Howdy
Replied by Howdy on topic Referencing an answer using SGQA
Thank you for the quick response. I tried using ExpressionScript as you demonstrated, but it didn't work for me. It's likely I'm using incorrect syntax. If my first question's code is Q1 and the subquestion codes are Q1B1, Q1B2, Q1B3, etc. then in my second question (code Q2) where I ask the respondent to rank their items from Q1, what should the Answer options syntax should be?

Here's what I tried for Q2:
Code     Answer options
Q2R1    {Q1_Q1B1}
Q2R2    {Q1_Q1B2}

as well as:
Code     Answer options
Q2R1    {Q1B1}
Q2R2    {Q1B2}

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
12 hours 28 minutes ago #268951 by Joffm
Replied by Joffm on topic Referencing an answer using SGQA
Always the best:
Send the lss export of these relevant questions.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

More
12 hours 14 minutes ago #268952 by Howdy
Replied by Howdy on topic Referencing an answer using SGQA
Unfortunately, IT restrictions prevent me from uploading lss files

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 hours 33 minutes ago - 9 hours 29 minutes ago #268954 by Joffm
Replied by Joffm on topic Referencing an answer using SGQA
Hi,
well, your first attempt is correct,
{Q1_Q1B1}
meaning: subquestion code "Q1B1" in question "Q1"
but only as long you don't want to use "array filter"
Why?
Because in Q2 the answer options are different.
Here you'd have a subquestion code like "Q2R1".

If you read the manual about "array filter"
[url] www.limesurvey.org/manual/Question_type_...ilter_(array_filter) [/url]
you'd have found
The subquestion codes used in the first question must coincide with the subquestion codes from the second one. Otherwise, the array filter function will not filter the answers to the first question.

In your case they do not.
Why don't you use just numeric codes as I showed in the screenshot?
I will never understand why somebody usues such strange subquestion codes without needs and furthermore doubles it (Q1_Q1B1)

Joffm

And you always can create a sample here
demo.limesurvey.org/admin/

 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 9 hours 29 minutes ago by Joffm.

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose