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

TOPIC: Can a no condition be added in looping

Can a no condition be added in looping 2 years 7 months ago #78203

Hi,

I have a survey where a question group is looped for 20 times. In that say a surveyor has exit the loop at 5th time then he clicks no button at the end of the 5th time, here the condition would be no.Then the control from the loop must come out and go to different group.

How can this be done?


you can check the sample link of the test survey:

119.226.87.69/limesurvey/index.php?sid=51766&lang=en

in the above test survey link i have 5 questions where i can jump directly from question 1 to last on clicking no, but where as i can not jump from rest questions i.e 2 to 4 on clicking no. how do for questions 2 to 4 as mentioned?

thanks,
Krishna
The administrator has disabled public write access.

Re: Can a no condition be added in looping 2 years 7 months ago #78211

  • tfj
  • tfj's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 80
  • Thank you received: 6
  • Karma: 5
Please set the permissions on your survey so that it may be viewed.

When clicking on your link, I get the following:

ERROR

We are sorry but you don't have permissions to do this.

Please contact Modelytics Admin ( This email address is being protected from spambots. You need JavaScript enabled to view it. ) for further assistance.

Thanks!

tfj
The administrator has disabled public write access.

Re: Can a no condition be added in looping 2 years 7 months ago #78215

now you can see
The administrator has disabled public write access.

Re: Can a no condition be added in looping 2 years 7 months ago #78217

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
What version of LimeSurvey are you using?

1.92 makes looping easy. Take a look at this example.

I you aren't using 1.92, try loading your survey to the demo site to see whether it works better there. If it doesn't, the issue is probably with the way the conditions are set.
The administrator has disabled public write access.

Re: Can a no condition be added in looping 2 years 7 months ago #78218

i m using 1.92

119.226.87.69/limesurvey/index.php?sid=51766&lang=en

you can try the above link. you will get an idea what i am asking
The administrator has disabled public write access.

Re: Can a no condition be added in looping 2 years 7 months ago #78219

  • tfj
  • tfj's Avatar
  • OFFLINE
  • Expert Lime
  • Posts: 80
  • Thank you received: 6
  • Karma: 5
tmswhite is a great resource for the answer to your question, since, as I understand, he was behind many, if not most, of the new changes to version 1.92. I just wanted to give credit where credit is due.

That being said, I made up a quick survey of 5 questions and set the conditions as follows. I apologize if I have misunderstood your requirement:

1) For question 2, show only if the answer to question 1 is "yes"
2) For question 3, show only if the answer to question 1 is "yes" and question 2 is "yes"
3) For question 4, show only if the answer to question 1 is "yes" and question 2 is "yes" and question 3 is "yes"

For an example of the new feature in 1.92, the relevance would be set as follows:

((Q1.NAOK == "Y") and (Q2.NAOK == "Y") and (Q3.NAOK == "Y"))

I "cheated" a little and used the conditional feature in 1.92, but it converted it to the relevance. I did this until I get more familiar with the new feature.

tfj
The administrator has disabled public write access.

Re: Can a no condition be added in looping 2 years 7 months ago #78221

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
I tried the link, but I'd need to see the actual survey logic to make recommendations.
The administrator has disabled public write access.

Re: Can a no condition be added in looping 2 years 7 months ago #78223

The logic is:

I have 5 groups with each question per group

G1 question yes/No, if yes then go to G2 ,if no then go G5
G2 question yes/no, if yes then g3,if no then g5
g3 question yes/no, if yes then g4,if no then g5
g4 question yes/no,if yes then g5 then submit after completing g5

how to put the relevance equation for this?

hope you understood the survey logic.


thanks,
Krishna
Last Edit: 2 years 7 months ago by krishna1088.
The administrator has disabled public write access.

Re: Can a no condition be added in looping 2 years 7 months ago #78228

  • TMSWhite
  • TMSWhite's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 759
  • Thank you received: 82
  • Karma: 36
Sorry, I'd need to see the actual survey .lss file to assess whether the conditions in it are consistent with the logic you specified.

Assuming your variable names are q1-q5, with one question per group, the relevance equations for q1-q5 should be:
q11
q2q1=='Y'
q3q2=='Y'
q4q3=='Y'
q51
The administrator has disabled public write access.

Re: Can a no condition be added in looping 2 years 7 months ago #78229

I am attaching the .lss file.

File Attachment:

File Name: limesurvey_survey_51766.lss
File Size: 31 KB
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.148 seconds
Donation Image