Welcome to the LimeSurvey Community Forum

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

Random Number as a Condition only works when random numbers are not hidden

  • annweb
  • annweb's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 3 months ago #191778 by annweb
Hi!
I am encountering a strange problem. In my survey, the last page is a text display page that refers to a random decision made in the survey. The random conditioning relies on two random number equations.

It seems to work perfectly fine when I have the random numbers generated visibly - so the conditions per se do not seem to be the source of the problem. As soon as I choose "Always hide this question" for the random numbers, the last page no longer is displayed, although the conditioning random numbers are stored in the results table correctly.

Can somebody help me? I am using Version 2.63.1+170305. Thank you!
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 3 months ago #191779 by Joffm
Hi!
This is really strange.
I tested in Version 2.73.1+171220 and found no issue.
My condition is: sum(R1,R2)!=3

Here you see:
The question is displayed because the sum is equal 4


But here the sum is equal 3 and the question is not displayed.


No difference if I display "question by question" or "group by group".

Unfortunately I cannot test in your - older - version.

You should send an lss export of the survey only containing the affected questions.

Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
4 years 3 months ago #191785 by tpartner
Hide the questions via CSS instead of the question setting.

Add a CSS class "hidden" in the question display settings.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
  • annweb
  • annweb's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 3 months ago #191962 by annweb
I tried this, but it does not work either then.
The topic has been locked.
  • annweb
  • annweb's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
4 years 3 months ago #191977 by annweb
Ok, my mistake. When entering the if(PayoffRand1 >= 1, PayoffRand1, rand(1, 6)) in the question text field rather than the source code, it puts <p></p> around it. If I remove this, it works.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose