Welcome to the LimeSurvey Community Forum

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

Compare value between two Questions

  • apoggio
  • apoggio's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 2 months ago #162735 by apoggio
Compare value between two Questions was created by apoggio
Hello,

I've two question:
sa05 which is a drop down list with numerical values between 1 and 14
sa07 which is a numerical input, integer between 1 an 14

I want as validation equation that the number entered in sa07 is smaller that what has been choosen in sa05

The following expression works fine:{sa07 > 3}
But I do not find the correct syntax for this :{sa05 > sa07}

Thank you for your help
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 2 months ago #162737 by holch
Replied by holch on topic Compare value between two Questions
This should work. Where do you use this? I would guess that you need to have if in a following "page" to sa07 for it to work, but I am not sure.

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.
  • apoggio
  • apoggio's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 2 months ago - 6 years 2 months ago #162741 by apoggio
Replied by apoggio on topic Compare value between two Questions
Hello find attached the survey.

It is use in the Question evaluation expression.
I also used it in the text of the question to see the result.
Last edit: 6 years 2 months ago by holch.
The topic has been locked.
  • apoggio
  • apoggio's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 2 months ago #162765 by apoggio
Replied by apoggio on topic Compare value between two Questions
Hello, any one as an idea why the syntax is not working?

Thx
The topic has been locked.
More
6 years 2 months ago #162776 by jelo
Replied by jelo on topic Compare value between two Questions
Perhaps the English forum is not the right place for attaching a complete survey in French.

You might create a two question survey with your issue and attach that here.
You should mention the version/build of your LimeSurvey version.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 2 months ago #162778 by holch
Replied by holch on topic Compare value between two Questions
We are all doing this in our spare time and voluntarily. So sometimes it takes a little longer. I will have a look at it, should I have some time.

But as Jelo says, an all french survey is sometimes difficult here, because we don't all speak french. Will see if I can get my way around.

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.
  • apoggio
  • apoggio's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 2 months ago #162779 by apoggio
Replied by apoggio on topic Compare value between two Questions
Hello Thanks,

Is there a way I can remove the survey in my posts?

Regarding the question I've found that it does not work because one in a number the other a String.

Is there a way to convert the string to number?

Regards
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 2 months ago #162782 by holch
Replied by holch on topic Compare value between two Questions
You should be able to go to "action" and "edit". there you can delete attachements. I have done this for you now.

Regarding the question I've found that it does not work because one in a number the other a String.


That is what I expected.

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: apoggio
The topic has been locked.
  • apoggio
  • apoggio's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
6 years 2 months ago #162785 by apoggio
Replied by apoggio on topic Compare value between two Questions
Thank you also for your time and reply.

I've found my issue.

I was relating to the Answer Code with my formula.
The code was a String.
This is the reason why it was not working.

I've changed the sa05.'Code' to numerical value and it works fine.
Here are the tests I've done:

answer sa05.shown : 5
answer sa05 : 6
Formula sa07 > 3 :true
Formula is_numeric(sa05): true ---> it is true now that I've changed the code values before (A1), now (1)
Formula validation sa07< sa05 (sa05.Code) :false
Formula is_numeric(sa05.shown) : true

I use the sa05.Code because I have the first value in the list which is '<1'

Thanks again to all your answers
The topic has been locked.
More
6 years 2 months ago #162805 by jelo
Replied by jelo on topic Compare value between two Questions

holch wrote: You should be able to go to "action" and "edit". there you can delete attachements.

You're not a normal user like apoggio or me. We can only edit post for a limited amount of time (perhaps 30 or 60 minutes). After that the edit function is gone.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
6 years 2 months ago #162806 by holch
Replied by holch on topic Compare value between two Questions
So you are saying I am not normal???

;-)

That's why I deleted the file on his request. As I didn't know if he can (or still can), I did it already. But good to know.

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.

Lime-years ahead

Online-surveys for every purse and purpose