Auto Select Radio Button Based on previous answers

More
2 weeks 6 days ago #191331 by jennh01851
I need a way to record if a participant is eligible or not based on their answers.
Ideally, a final radio button that gets selected automatically based on their previous answers. This would also be used to determine which thank you page they get sent to when they hit submit.
I am sure there is an equation that can do this but I am stumped.
I am using LimeSurvey
Version 3.17.7+190627

Basically ...(i am simplifying)
if Q1) Yes Q2) No then they are eligible and I want the radio button clicked.

Please Log in or Create an account to join the conversation.

More
2 weeks 6 days ago #191333 by holch
You can use the Expression Manager/Script for this.

You could create this question with radio buttons and then create an equation question which will click automatically an answer in this question, based on previous responses.

Lets say you have the following questions:

Q1:
(1) Yes
(2) No

Q2:
(1) Yes
(2) No

Q3:
(1) Eligable
(2) Not eligable

Q4 (type equation) should contain something like this (not tested, just to give you an idea:
{if(Q1==1 AND Q2==2, Q3=1)}

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in or Create an account to join the conversation.

More
2 weeks 6 days ago #191334 by jennh01851
I cannot figure out what i am doing wrong. I have attached the relevant page.

File Attachment:

File Name: limesurvey...8861.lss
File Size:22 KB
Attachments:

Please Log in or Create an account to join the conversation.

More
2 weeks 6 days ago #191336 by DenisChenu

holch wrote: Q4 (type equation) should contain something like this (not tested, just to give you an idea:

{if(Q1==1 AND Q2==2, Q3=1)}

No ;)

See manual : manual.limesurvey.org/Expression_Manager..._Assignment_Operator

Then :
{Q3=if(Q1==1 AND Q2==2,1,Q3.NAOK)}


Else : seems you can use quota for your system, then I update the survey with a 0 quota.

File Attachment:

File Name: limesurvey...ixed.lss
File Size:23 KB

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 .
An error happen ? Before make a new topic : remind the Debug mode .
Attachments:
The following user(s) said Thank You: holch

Please Log in or Create an account to join the conversation.

More
2 weeks 5 days ago - 2 weeks 5 days ago #191354 by jennh01851
It is still not auto selecting the radio button.....
Last edit: 2 weeks 5 days ago by jennh01851.

Please Log in or Create an account to join the conversation.

More
2 weeks 5 days ago #191365 by DenisChenu

jennh01851 wrote: It is still not auto selecting the radio button.....

It select radio buttçon when move next …
And goes to the quota out when are not "eligible"
Pregnant woman goes out by quota …

proof

And best is to read …


I think i take more time to fix your issue then you take to explain what you want …

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 .
An error happen ? Before make a new topic : remind the Debug mode .
Attachments:

Please Log in or Create an account to join the conversation.

More
2 weeks 4 days ago #191376 by holch
Hi Denis,
I had downloaded your version and tested and it didn't work for me either. It always just wrote marked "A2" (not eligible) for me. But I didn't have much time to test yesterday.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Please Log in or Create an account to join the conversation.

More
2 weeks 4 days ago #191380 by jelo
if(twins.NAOK == 'A2' AND hairsample== "Y", 'A1','A2'))}

Pregnant with twins or more=NO and Hairsample=YES -> A1
All other combinations = A2

Is that really the intention?
The threadstarting post with Q1..Q3 is not relating to the LSS export.
Q1 = Yes and Q2=No -> Eligable

I recommend to explain the wanted behavior with variable names of the LSS export.
And to compare the LimeSurvey versions used by everyone if not error can be found in the LSS export.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Please Log in or Create an account to join the conversation.

More
2 weeks 4 days ago #191381 by DenisChenu

holch wrote: Hi Denis,
I had downloaded your version and tested and it didn't work for me either. It always just wrote marked "A2" (not eligible) for me. But I didn't have much time to test yesterday.

What to check to have A1

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 .
An error happen ? Before make a new topic : remind the Debug mode .
Attachments:

Please Log in or Create an account to join the conversation.

More
2 weeks 4 days ago - 2 weeks 4 days ago #191390 by jennh01851
Last edit: 2 weeks 4 days ago by jennh01851. Reason: fixed based on last answer

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!