Welcome to the LimeSurvey Community Forum

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

Relevance equation marked as wrong until Checking the Logic

  • NielsFro
  • NielsFro's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 10 months ago #170062 by NielsFro
Hi LimeSurvey Forum,


I'm experiencing a strange behaviour which I can't really explain and I wonder if you have come across the same:


I have a survey in which
1) question B is only displayed if question A is checked with YES and
2) question C is only displayed if question B is checked with YES

in some cases, when I just view the question overview, LimeSurvey tells me that the equations are wrong (see screenshot 1)

when I click on "Check Logic" in the top navigation, I can not find any error (see screenshot 2)

when I then go back to the question overview, the equation is displayed as correct (screenshot 3)


I wasn't yet able to find out if an equation errorous equation (marked in bold red) really does not work, or if it is working fine anyways, since it should actually be correct.

Here's some information on the system and the server

LimeSurvey version: 3.4.4
LimeSurvey build: 180305
PHP version: 7.1.18
Web server software: Apache
Database driver: mysql
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 10 months ago #170073 by holch
You noticed that in screenshot 1 you are using the SGQA code and in screenshot 2 you are using the question code, right?

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • NielsFro
  • NielsFro's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 10 months ago #170088 by NielsFro
Hi holch, thanks a lot for your quick reply!

Of course I have noticed the different formats - the strange thing is, that I did not change anything from screenshot 1 to screenshot 3. I only clicked on "Check Logic" and then went back to the original page - then it changed "automatically".

The condition was created using the Conditions Designer in LimeSurvey.
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 10 months ago #170089 by holch

The condition was created using the conditions Designer in LimeSurvey.


Ok, so this is important information, because Relevance equations are not 100% the same as Conditions. Seems that the condition designer is creating expressions/relevance equations, but it still isn't the same.

However, of course the conditions created by LS should not result in errors. However, before creating a bug report you should upgrade to the latest version and see if the problem still persists. If so, please file a bug report. It does not really make sense to file bug reports for older versions, because the problem might be solved already in the latest version.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 10 months ago #170093 by DenisChenu
It happen some time, seems to be when session survey are not done…

Hard to fix because near hard to reproduce :). But if you have a clean step by step to reproduce issue : please report issue :)

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 .
I don't answer to private message.
The topic has been locked.
  • NielsFro
  • NielsFro's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 10 months ago #170213 by NielsFro
Thanks a lot to both of you for your answers!

Unfortunately, I can not provide a clean way to reproduce this... We'll upgrade to the latest version at first and check it again.

However - as holch said, the conditions designer is not exactly the same as creating relevance equations - would you recommend using the SQGA input field when editing the question to create the relevance equation?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 10 months ago #170224 by tpartner
Using the relevance field is far more versatile and faster than the conditions designer.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu, NielsFro
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 10 months ago #170238 by holch
I also would always use Expression Manager and relevance equations over conditions.

Reasons:
- As Tony says: once you understood how it works, it is a lot quicker. And it doesn't take long to understand it. Simple relevance equations are really, really quick.
- You can do a lot more complicated stuff with expressions.
- You can do it while you create the question and test it already, so you don't have to create the question, then go into the conditions designer

Give it a shot. I know sometimes it is scary to give up the GUI, but the EM codes are not too complicated and once you got it, you will never want to go back to the conditions.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The following user(s) said Thank You: NielsFro
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 9 months ago - 5 years 9 months ago #171165 by Joffm
Hi,

Let's say, you created a survey with two questions (Q1 and Q2) and the relevance equation of Q2 "Q1==1".

So the next day you open your survey and open question Q2 the relevance equation is displayed in red - marked as error.
In my opinion at that stage LS is not aware that a question Q1 exists.
If you open Q1 to edit and save, and then open Q2 again, everything is fine.
Now LS knows about the question Q1.

If you run the logic file, of course LS loops through all questions.
So it knows which questions are there or not and does not show this "error".

Best regards
Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 5 years 9 months ago by Joffm.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 9 months ago #171213 by DenisChenu

Joffm wrote: …
So the next day you open your survey and open question Q2 the relevance equation is displayed in red - marked as error.
In my opinion at that stage LS is not aware that a question Q1 exists.
If you open Q1 to edit and save, and then open Q2 again, everything is fine.
Now LS knows about the question Q1.

Yes, but still an issue : it work in 2.73 and previous.
If i remind : fix are already apply to 3.X but still not fixed (or un-fixed).

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 .
I don't answer to private message.
The topic has been locked.
More
5 years 8 months ago #171799 by asiin
Same Problem here with the latest version. LS produces errors in the relevance equation that was created with the conditions designer.

Regardless of the workaround with Expression Manager, this is still a bug!
The topic has been locked.
More
5 years 8 months ago #171810 by jelo

asiin wrote: Regardless of the workaround with Expression Manager, this is still a bug!

Well, any bugticket number at hand? Or did some tried to submit a bug? As long as there is no stable way to reproduce the issue, the issue will live on.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: DenisChenu
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose