Using array filters or expressions when question type is drop down list

More
2 months 4 weeks ago - 2 months 4 weeks ago #179655 by LimeUserTest
I have a survey of two questions :


Question 1: Where are you from ? (of type drop down list)

- United states
- Belgium


Question 2: How much is your salary ? (of type drop down list)

- 5000 $/€
- more than 5000 $/€

The answer options of the second questions are shown in the currency with respect to the country chosen in question 1. Since I don't want to create many conditional questions with different currencies (current solution). I am trying to find a way to change them by using an expression.
Another solution was to use this expression in the answer options 5000 {if ( Q1=='A1' , '$' ,'€')} as in the attached file.
This solution would work if the type of question is Multiple choice but would not work for the drop down list unfortunately cause apparently this is a bug in Lime Survey.
Is there any other expression to try ? Or a Java script code to do that ?

File Attachment:

File Name: limesurvey...test.lss
File Size:16 KB
Attachments:
Last edit: 2 months 4 weeks ago by LimeUserTest.

Please Log in or Create an account to join the conversation.

LimeSurvey Partners
More
2 months 4 weeks ago #179660 by DenisChenu

LimeUserTest wrote: If the type of question is Multiple choice but would not work for the drop down list unfortunately cause apparently this is a bug in Lime Survey.
Is there any other expression to try ? Or a Java script code to do that ?

Not a bug, since we can not update drop down via javascript in same way : Expression in fdropdown use static variable .

You can use Radio list if it's same page.
In another page : it's OK if you are in 3.15.5 (or 6).

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
The following user(s) said Thank You: LimeUserTest

Please Log in or Create an account to join the conversation.

More
2 months 4 weeks ago #179665 by LimeUserTest
Thank you !
But in my case I need to use the drop down type. I don't want to go throw a radio list cause this is a requirement. I understand from your reply that there is no way to do it with the drop down list even in Java Script ?
Thanks again

Please Log in or Create an account to join the conversation.

More
2 months 4 weeks ago #179672 by DenisChenu
Yes, you can use a dropdow and update value with JS, but it's REALLY more hard …

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in or Create an account to join the conversation.

More
2 months 3 weeks ago #179772 by Joffm
Hi,
here you get an example.
Well, base language is italian, but this only affects the buttons, etc.






File Attachment:

File Name: limesurvey...7575.lss
File Size:21 KB


Best regards
Joffm


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

Please Log in or Create an account to join the conversation.

More
2 months 3 weeks ago #179846 by LimeUserTest
Hi Joffm,
that makes sense and is working thank you. But I am wondering why isn't it working in case the question number 1 and number 2 are in the same group ?!

Please Log in or Create an account to join the conversation.

More
2 months 3 weeks ago - 2 months 3 weeks ago #179850 by holch

Hi I am using free plan of Lime survey which shows that 25 responses can be recorded per month. I have calculated my survey participants and it makes 28 responses , so can I still use this free plan or I have to buy the basic plan?

This has nothing to do with this thread. Please ask this in your own thread.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
Last edit: 2 months 3 weeks ago by holch.
The following user(s) said Thank You: DenisChenu

Please Log in or Create an account to join the conversation.

More
2 months 3 weeks ago #179852 by tpartner

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

Please Log in or Create an account to join the conversation.

More
2 months 3 weeks ago #179855 by Joffm
Hi,

But I am wondering why isn't it working in case the question number 1 and number 2 are in the same group ?!

Because I ran it "group by group".
If you say "question by question" it can be in the same group.

The important thing is that the two questions are NOT on the same screen.

Best regards
Joffm


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

Please Log in or Create an account to join the conversation.

More
2 months 3 weeks ago #179863 by LimeUserTest
Yes, but unfortunately I need them to be on the same screen and that's the point!!

Please Log in or Create an account to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now
Join our Newsletter!