Welcome to the LimeSurvey Community Forum

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

Count No of Questions Remaining

  • diadora
  • diadora's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 2 months ago #172182 by diadora
Count No of Questions Remaining was created by diadora
Hello,

I don't know if I'm asking something pretty straightforward, but I would like to count the questions in a particular question group (so not all the questions) and advise this to the user before they move to the next page.

This is because that there are some combinations of answers which could give zero questions, and I would like to be able to inform the user how many questions are in the next group before they click 'next' and then are surprised to see there are no questions.

I'm aware that with the assessments there is a total question count - but is there anyway to count the questions in the question group and display this to the user as the click on the other answers?

Thanks for your help!
CB
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 2 months ago #172186 by tpartner
Replied by tpartner on topic Count No of Questions Remaining
You cold use Expression manager to tailor a text-display question depending on how questions are answered.

- www.limesurvey.org/manual/Expression_Man...swers.2C_and_Reports

I'm a bit stuck on "...surprised to see there are no questions". That should never happen.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 2 months ago #172192 by Joffm
Replied by Joffm on topic Count No of Questions Remaining
Hi,
as Tony said:

they click 'next' and then are surprised to see there are no questions.

should not happen.
Then you did not set the correct relevance equation on the group. Of course the group is only displayed if there are questions.

BUT: How are you going to manage the following:
The group contains of 5 questions; two are only asked if - let's say - the first question is answered "Yes".
How can you know before how many questions have really to be answered?

Just to consider
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • diadora
  • diadora's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 2 months ago #172202 by diadora
Replied by diadora on topic Count No of Questions Remaining
Thanks Tony & Joffm for your responses.

I'm expecting to use expression manager to calculate this number .. however I'm unaware of the variable names linked to the question count in order to build the calculation (is there a list somewhere?).

While it is 'bad etiquette' I'm not worried on this occasion if there are no questions in the next group .. however I do admit it would be better to give some kind of message. I believe I could do this by inserting a 'text display' question which contains a message .. but again (without repeating all the original conditions .. which is not so easy) I don't know how to count the questions.

Had I just added these questions to the main list in the first group. then as the answers are selected they would dynamically disappear .. however the unfiltered list to start with is pretty long and hence I'd rather put this on a new page.

For your comment Joffm, once the enter the next question group there are no more conditions imposed once these questions are answered.

I hope my answers were clear enough for you!

Thanks, CB
The topic has been locked.
More
6 years 2 months ago #172209 by jelo
Replied by jelo on topic Count No of Questions Remaining

diadora wrote: I'm expecting to use expression manager to calculate this number .. however I'm unaware of the variable names linked to the question count in order to build the calculation (is there a list somewhere?).

I'm not aware that LS is providing such infos. Perhaps such variables can be exposed.

Would help calculating a progressbar based on questions shown or current question position in the survey.
bugs.limesurvey.org/view.php?id=9677

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 2 months ago #172210 by tpartner
Replied by tpartner on topic Count No of Questions Remaining
You will need to recreate the question hide/show logic in your Expression Manager tailoring.

Regarding the empty group, you should be able to place group-level relevance so the group is also hidden if all questions are hidden.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 2 months ago #172216 by Joffm
Replied by Joffm on topic Count No of Questions Remaining

You will need to recreate the question hide/show logic in your Expression Manager tailoring.


To give you an example:
In Group G2 questions have the following relevance equations:
Q2a (Q1a==1)
Q2b (Q1a==2)
Q2c1 (Q1b_SQ001=="Y")
Q2c2 (Q1b_SQ002=="Y")
Q2c3 (Q1b_SQ003=="Y")
Q2c4 (Q1b_SQ004=="Y")
Q2d (Q1c>40)
Q2e (always)

So the are 7 questions in Group G2:
You can calculate the number of really shown questions by summing up.
If a condition is true, "1" is added, if the condition is wrong, "0" is added.

{sum(if(Q1a==1,1,0),if(Q1a==2,1,0),if(Q1b_SQ001=="Y",1,0),if(Q1b_SQ002=="Y",1,0),if(Q1b_SQ003=="Y",1,0),if(Q1b_SQ004=="Y",1,0),if(Q1c>40,1,0),1)}

To get a more realistic example you should provide your survey, or a part of it. (*.lss)

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: tpartner
The topic has been locked.
  • diadora
  • diadora's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 2 months ago #172224 by diadora
Replied by diadora on topic Count No of Questions Remaining
OK, I follow what you say here - I think with this I can work something out .. thanks again for your help!
CB
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose