- Posts: 5
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
AutoFill Response
- ResearchSpok
- Topic Author
- Offline
- New Member
Less
More
7 years 11 months ago #135408
by ResearchSpok
AutoFill Response was created by ResearchSpok
I feel a little stupid posting this question, as I'm sure it's easy to do and the information is already out there somewhere, but I haven't had any luck finding it. I have a question which asks for the respondent's county. The counties are sorted into three markets, with quotas for each. Is there a way to set a hidden question that will automatically input the market into the database based on their county? For instance, the respondent reports they live in County X, there would be a hidden question that automatically selects Market 1 or if they say County A, it automatically selects Market 2.
Thanks in advance,
Andrew
Thanks in advance,
Andrew
The topic has been locked.
- Ben_V
- Offline
- Platinum Member
Less
More
- Posts: 1128
- Thank you received: 329
7 years 11 months ago #135411
by Ben_V
Benoît
EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Replied by Ben_V on topic AutoFill Response
Hi welcome,
Which kind of question type are you using for counties?
Which kind of question type are you using for counties?
Benoît
EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
The topic has been locked.
- ResearchSpok
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
7 years 11 months ago #135413
by ResearchSpok
Replied by ResearchSpok on topic AutoFill Response
List(Radio)
The topic has been locked.
- Ben_V
- Offline
- Platinum Member
Less
More
- Posts: 1128
- Thank you received: 329
7 years 11 months ago #135414
by Ben_V
Benoît
EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Replied by Ben_V on topic AutoFill Response
If the question code for this radio question is "Q1" ...
containing 2 items with answer option codes "us" & "uk"...:
just set an equation type question using the following code or syntax as question text:
containing 2 items with answer option codes "us" & "uk"...:
just set an equation type question using the following code or syntax as question text:
Code:
{if(Q1=='us','Market 1','')} {if(Q1=='uk','Market 2','')}
Benoît
EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
The topic has been locked.
- ResearchSpok
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
7 years 11 months ago #135415
by ResearchSpok
Replied by ResearchSpok on topic AutoFill Response
Almost there. I should have mentioned, the main reason that I'm doing this is to make it easier to monitor quotas. Is there a way to make the information from that equation trip a radio (list)?
The topic has been locked.
- Ben_V
- Offline
- Platinum Member
Less
More
- Posts: 1128
- Thank you received: 329
7 years 11 months ago #135416
by Ben_V
Benoît
EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Replied by Ben_V on topic AutoFill Response
In this case it's easier to use a checkbox question with just one answer option checked by default... and play with relavance field
for example if you only target USA & UK:
1) set a multiple choice question
2) create one answer option
3) tick it by default (there is an icon for that near answer option creation)
4) In the relevance field set your formula, something like:
(in clear: true if not uk or not us)
5) hide this question
6) Apply your quota if this question is relevant
for example if you only target USA & UK:
1) set a multiple choice question
2) create one answer option
3) tick it by default (there is an icon for that near answer option creation)
4) In the relevance field set your formula, something like:
Code:
((Q1!='us') || (Q1!='uk'))
5) hide this question
6) Apply your quota if this question is relevant
Benoît
EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
The topic has been locked.
- ResearchSpok
- Topic Author
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 0
7 years 11 months ago #135433
by ResearchSpok
Replied by ResearchSpok on topic AutoFill Response
Perfect. I had never noticed that check by default option before. Very helpful.
The topic has been locked.
- Ben_V
- Offline
- Platinum Member
Less
More
- Posts: 1128
- Thank you received: 329
7 years 11 months ago #135434
by Ben_V
Benoît
EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
Replied by Ben_V on topic AutoFill Response
for radio buttons and other question types too...
Benoît
EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
The following user(s) said Thank You: ResearchSpok
The topic has been locked.
- FranzGerbig
- Offline
- Senior Member
Less
More
- Posts: 61
- Thank you received: 0
7 years 9 months ago #138681
by FranzGerbig
using LS 3.13.2+180709
Replied by FranzGerbig on topic AutoFill Response
Hi guys,
does anyone see the error (t2m69v01 is a multiple choice question)? :blink:
Thanks in advance
This question has at least 1 error. 1
if((t2m69v01_1 == "Y") OR (t2m69v01_2 == "Y")), 2, ' ' if(t2m69v01_3 == "Y"), 4, ' ' if(t2m69v01_4 == "Y"), 3, ' ' if(t2m69v01_nd == "Y"), 1, ' ' if((t2m69v01_1 == "N") and (t2m69v01_2 == "N") and (t2m69v01_3 == "N") and (t2m69v01_4 == "N") and (t2m69v01_nd == "N"), 5, ' '
Question attribute Value
statistics_showgraph 1
hidden 1
does anyone see the error (t2m69v01 is a multiple choice question)? :blink:
Thanks in advance
This question has at least 1 error. 1
if((t2m69v01_1 == "Y") OR (t2m69v01_2 == "Y")), 2, ' ' if(t2m69v01_3 == "Y"), 4, ' ' if(t2m69v01_4 == "Y"), 3, ' ' if(t2m69v01_nd == "Y"), 1, ' ' if((t2m69v01_1 == "N") and (t2m69v01_2 == "N") and (t2m69v01_3 == "N") and (t2m69v01_4 == "N") and (t2m69v01_nd == "N"), 5, ' '
Question attribute Value
statistics_showgraph 1
hidden 1
using LS 3.13.2+180709
Attachments:
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13643
- Thank you received: 2491
7 years 9 months ago #138693
by DenisChenu
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.
Replied by DenisChenu on topic AutoFill Response
Seems you lost a lot of ) at end of the equation.
Denis
Denis
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.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10109
- Thank you received: 3593
7 years 9 months ago #138696
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic AutoFill Response
I don't think that there are any "N" values for multiple choice sub questions. The values should be "Y" (checked) or "" (unchecked).
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
- FranzGerbig
- Offline
- Senior Member
Less
More
- Posts: 61
- Thank you received: 0
7 years 9 months ago #138737
by FranzGerbig
using LS 3.13.2+180709
Replied by FranzGerbig on topic AutoFill Response
Well ... :huh:
The logic check is the same for "N" & "".
I added one ) which was definitely missing, but there's something wrong, still :S
{if((t2m69v01_01=="Y") OR (t2m69v01_02=="Y")), 2,' '} {if(t2m69v01_03=="Y"), 4,' '} {if(t2m69v01_04=="Y"), 3,' '} {if(t2m69v01_nd=="Y"), 1,' '} {if((t2m69v01_01=="") and (t2m69v01_02=="") and (t2m69v01_03=="") and (t2m69v01_04=="") and (t2m69v01_nd=="")), 5,' '}
The logic check is the same for "N" & "".
I added one ) which was definitely missing, but there's something wrong, still :S
{if((t2m69v01_01=="Y") OR (t2m69v01_02=="Y")), 2,' '} {if(t2m69v01_03=="Y"), 4,' '} {if(t2m69v01_04=="Y"), 3,' '} {if(t2m69v01_nd=="Y"), 1,' '} {if((t2m69v01_01=="") and (t2m69v01_02=="") and (t2m69v01_03=="") and (t2m69v01_04=="") and (t2m69v01_nd=="")), 5,' '}
using LS 3.13.2+180709
The topic has been locked.