Welcome, Guest
Username: Password: Remember me

TOPIC: Autopunch answers

Autopunch answers 8 months 3 weeks ago #104529

  • dknvs
  • dknvs's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 12
  • Karma: 0
I would like to know how can I autopunch the answers for limesurvey when piping into another question.

Here is an example to illustrate:

Q1 is a multiple select question.
What did you buy at the grocery store?
-meat
-fruit
-cheese
-vegetables

Q2 is a single select(radio) question
Which one is the most expensive grocery that you bought?

I would like to pipe what I selected in Q1 into this question. But since Q1 is a multiple select question, I want people who select only ONE option from Q1 to skip Q2. But this person's answer will be autopunched in Q2.

For example, respondent A choose only "meat" from Q1. I want to autopunch "meat" in Q2 for this respondent without them seeing Q2.

It will be great if someone can help me out with this issue.

thanks
The administrator has disabled public write access.

Autopunch answers 8 months 2 weeks ago #104534

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5333
  • Thank you received: 296
  • Karma: 249
Check the array filter feature, it does exactly what you are talking about: manual.limesurvey.org/Question_type_-_Li...r_.28array_filter.29

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
Last Edit: 8 months 2 weeks ago by Mazi.
The administrator has disabled public write access.
The following user(s) said Thank You: dknvs

Autopunch answers 8 months 2 weeks ago #104620

  • dknvs
  • dknvs's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 12
  • Karma: 0
Hi,

I really appreciate your response.
I wasn't being very clear in my question.
I understand how to do array filter to only shows the options that piped from the previous questions.
What I don't understand is that if respondents only choose one option from Q1, it won't make sense for respondents to see Q2 (because Q2 is asking the most expensive grocery).
I would like respondents who only choose ONE OPTION(e.g., meat) from Q1 can skip Q2, BUT their answers (meat) for Q2 is automatically filled in the data.

hope this make sense...

thank you
The administrator has disabled public write access.

Autopunch answers 8 months 2 weeks ago #104649

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5333
  • Thank you received: 296
  • Karma: 249
That of course makes sense but such a feature doesn't exist at Limesurvey.

Instead, you can show Q2 only if >1 answers were given at the previous question. Use this relevance equation:
count(q1_1, q1_2, ...)>1

where q1 ist the question code and 1, 2, ... n are the subquestion codes of q1.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
The following user(s) said Thank You: dknvs

Autopunch answers 8 months 2 weeks ago #104723

  • dknvs
  • dknvs's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 12
  • Karma: 0
so this equation will let respondents skip Q2 (if they only choose 1 answer). However, it won't autopunch the data for Q2?

"I would like respondents who only choose ONE OPTION(e.g., meat) from Q1 can skip Q2, BUT their answers (meat) for Q2 is automatically filled in the data."
The administrator has disabled public write access.

Autopunch answers 8 months 2 weeks ago #104727

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4281
  • Thank you received: 807
  • Karma: 370
Well, if both questions are on the same page, you could do that with JavaScript but I don't understand why you need it. If only one option is checked in Q1, don't you already know the answer to Q2?


.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Autopunch answers 8 months 2 weeks ago #104729

  • dknvs
  • dknvs's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 12
  • Karma: 0
These two questions will be in separate page.
Could you please tell me how to do it with JavaScript?
You are right, we will know the answer to Q2 if only one option is checked in Q1. That's why it doesn't make sense for them to see Q2. But for the convenience of analyzing the data, we will want that data to be auto filled in for Q2.
The administrator has disabled public write access.

Autopunch answers 8 months 2 weeks ago #104730

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4281
  • Thank you received: 807
  • Karma: 370
As I said, "if both questions are on the same page, you could do that with JavaScript".

It is possible if the questions are on separate pages but gets very complicated and is probably too much work for "convenience of analyzing".

Regarding "That's why it doesn't make sense for them to see Q2", you can use Mazi's method of hiding the question.


.
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Last Edit: 8 months 2 weeks ago by tpartner.
The administrator has disabled public write access.

Autopunch answers 8 months 2 weeks ago #104734

  • david2013
  • david2013's Avatar
  • OFFLINE
  • Junior Lime
  • Posts: 26
  • Thank you received: 3
  • Karma: 2
I guess you can do it in two ways:
1) At Q2, use jQuery to check number of answers in Q1, if more than 1, do nothing; if just one answer, use jQuery to select the answer, then submit the form automatically. The only disadvantage is that survey taker will see flash of Q2.

2) Never try it before. But may be you can try it. Assuming you have Q3 and everyone need to answer it. At Q3, check number of answers in Q1, if more than 1, do nothing; if just one answer, you can use jQuery to insert a hidden field which contains answer of Q2. Also, at Q2, you can use Mazi's method to hide the question.

I also hoping Limesurvey can do autopunching. I remember when I was working for data collection company, we have data department to check the data. If programmers forgot to do the autopunching, they always screaming like 3 yrs kid.

Thanks,
David
The administrator has disabled public write access.
The following user(s) said Thank You: dknvs

Autopunch answers 8 months 2 weeks ago #104745

  • Mazi
  • Mazi's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 5333
  • Thank you received: 296
  • Karma: 249
If you really need that auto punching, create either a text question and use an EM expression for filling it with the one answer selected at Q1
OR
create X (X = number of answer options at Q1) follow up list radio question, each with a different default answer and being filled only if at Q1 one answer was given.

The later might be tricky because you need to hide the questions using JS so the default answer gets populated. I didn't test this yet.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)limesurvey.org'"
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.118 seconds
Donation Image