Welcome to the LimeSurvey Community Forum

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

Hide answer if choose by another participant

  • ftrojet
  • ftrojet's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 4 months ago #244075 by ftrojet
Please help us help you and fill where relevant:
Your LimeSurvey version: Version 5.4.5+221010
Own server or LimeSurvey hosting: Own server
Survey theme/template:
==================
Hi,
I want to hide answer of multiple choice (boostrap button) if select by another participant.
After search, i don't find the solution.
 
 

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 4 months ago #244082 by Joffm
Hi,
please, do not double post.

Well,
on one hand this is very easy to implement.
In the plugin "statFunctions" (included in your version, maybe you have to activate it) you have to functions
"statcount" and "statcountif"
[url] www.limesurvey.org/manual/StatFunctions [/url]
in the subquestion relevance you display the subquestion as long as the count is 0.

But on the other hand: How do you expect it to work?
If you take into account only completed surveys:
As long as the first participant didn't submit the survey all other participants get a count of 0. Only after the first participant submits his surey the next participants don't see his choice.

And if you take into account all responses
If the first participant selects option 1, but afterwards closes his browser, doesn't complete the survey, otion 1 is never displayed.

So the only working scenario is:
A participant can only start the survey after the previous submitted it.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

  • ftrojet
  • ftrojet's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 4 months ago #244085 by ftrojet
Replied by ftrojet on topic Hide answer if choose by another participant
Thank for your reply.
I have insert the condition : {statCount(QuestionCode.SQ001[, submitted = 1][, self = true])<1} on each answer filter condition.Unfortunately the answers are not hidden. 

Please Log in to join the conversation.

  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
1 year 4 months ago #244086 by Joffm
Please, read the manual about
[url] www.limesurvey.org/manual/ExpressionScri...code_variable_naming [/url]

And see the examples on the statFunction page (7th is nearly what you need)

Remember:
You count IF the subquestion is answered.
I hope you know that in a multiple question the selected subquestion is stored as "Y", the ot selected as "".

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: ftrojet

Please Log in to join the conversation.

  • ftrojet
  • ftrojet's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
1 year 4 months ago #244088 by ftrojet
Replied by ftrojet on topic Hide answer if choose by another participant
thank you very much everything works with the following equation : if(statCountIf(Q00_SQ001.sgqa, "Y", 0)<1,1,0)

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose