- Posts: 10
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
With EM generated text not shown as text but as EM equation in subsequent Qs
- MBAK
- Topic Author
- Offline
- New Member
Less
More
3 years 5 months ago #207901
by MBAK
With EM generated text not shown as text but as EM equation in subsequent Qs was created by MBAK
Hi
I am using EM to use answers of multiple short text as input for a rank question (so far so good) than i use EM to get the first 3 ranks as input for a other text input question. There, the text is not shown properly, but it shows the EM equation.
You will find an example survey attached.
Tested: Firefox & Chrome, with default template
Version: 4.3.2 + 200629
I am using EM to use answers of multiple short text as input for a rank question (so far so good) than i use EM to get the first 3 ranks as input for a other text input question. There, the text is not shown properly, but it shows the EM equation.
You will find an example survey attached.
Tested: Firefox & Chrome, with default template
Version: 4.3.2 + 200629
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10113
- Thank you received: 3595
3 years 5 months ago - 3 years 5 months ago #207905
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic With EM generated text not shown as text but as EM equation in subsequent Qs
What is the equation? Have you checked the logic file?
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 3 years 5 months ago by tpartner.
The topic has been locked.
- MBAK
- Topic Author
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 1
3 years 5 months ago #207909
by MBAK
Replied by MBAK on topic With EM generated text not shown as text but as EM equation in subsequent Qs
Hi tpartner
Yes, in the logic file everything seems o.k.
The EQ in the last question is a simple QID_1.shown (QID beeing the question Code and _1 beeing rank 1).
I think the problem comes from the second question, where i insert the answers of the free text question by using: QID_SQ1comment to insert the text.
See also my attached survey where i did a small replication of the problem.
Yes, in the logic file everything seems o.k.
The EQ in the last question is a simple QID_1.shown (QID beeing the question Code and _1 beeing rank 1).
I think the problem comes from the second question, where i insert the answers of the free text question by using: QID_SQ1comment to insert the text.
See also my attached survey where i did a small replication of the problem.
The topic has been locked.
- Joffm
- Away
- LimeSurvey Community Team
Less
More
- Posts: 12967
- Thank you received: 3989
3 years 5 months ago - 3 years 5 months ago #207910
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic With EM generated text not shown as text but as EM equation in subsequent Qs
Don't show it on the same page.
By the way:
Your "Other" option in the multiple question is not piped to the next questions.
Better to have a "normal" option "Others" and display the next question only if this is selected.
Why do you use a multiple with comment question?
In my opinion better use a muiltiple text question and display dynamically row by row. This way you avoid that somebody only fills option 2 and option 5.
Here my idea:
Joffm
By the way:
Your "Other" option in the multiple question is not piped to the next questions.
Better to have a "normal" option "Others" and display the next question only if this is selected.
Why do you use a multiple with comment question?
In my opinion better use a muiltiple text question and display dynamically row by row. This way you avoid that somebody only fills option 2 and option 5.
Here my idea:
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 years 5 months ago by Joffm.
The topic has been locked.
- MBAK
- Topic Author
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 1
3 years 5 months ago #207919
by MBAK
Replied by MBAK on topic With EM generated text not shown as text but as EM equation in subsequent Qs
Hi Joffm
Many thanks, it works very good.
May i ask a question: would it be possible to also get the last 3 ranks (the first 3 is easy because it is always 1-3, but the last 3 depend on how many additional criterias the respondents did fill in....
Many thanks
Many thanks, it works very good.
May i ask a question: would it be possible to also get the last 3 ranks (the first 3 is easy because it is always 1-3, but the last 3 depend on how many additional criterias the respondents did fill in....
Many thanks
The topic has been locked.
- Joffm
- Away
- LimeSurvey Community Team
Less
More
- Posts: 12967
- Thank you received: 3989
3 years 5 months ago - 3 years 5 months ago #207924
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic With EM generated text not shown as text but as EM equation in subsequent Qs
So you have to count the selected items.
That's easy.
{count(that.G03Q09)}
and
{count(that.G03Q10)}
and sum up.
The problem is that you may count the "Other" of G03Q09.
So you have to say:
{if(count(that.G03Q10)==0,sum(count(that.G03Q09),count(that.G03Q10)),sum(count(that.G03Q09),count(that.G03Q10))-1)}
or
{if(G03Q09_SQ13)!="Y",sum(count(that.G03Q09),count(that.G03Q10)),sum(count(that.G03Q09),count(that.G03Q10))-1)}
meaning: if there were "Others" you sum and calculate "-1".
This I'd insert into a hidden equation (let's call it eqCount).
Now you know how many items are ranked.
In the last question show all items as in the ranking question with subquestion relevances.
Think:
The 17 th rank can only be displayed if 17 items were ranked
The 16 th rank can only be displayed if 17 items or 16 items were ranked
The 15 th rank can only be displayed if 17, 16 or 15 items were ranked
The 14 th rank can only be displayed if 16, 15 or 14 items were ranked
...
Here the sample (the equation is not hidden, you have to do that after testing)
Joffm
That's easy.
{count(that.G03Q09)}
and
{count(that.G03Q10)}
and sum up.
The problem is that you may count the "Other" of G03Q09.
So you have to say:
{if(count(that.G03Q10)==0,sum(count(that.G03Q09),count(that.G03Q10)),sum(count(that.G03Q09),count(that.G03Q10))-1)}
or
{if(G03Q09_SQ13)!="Y",sum(count(that.G03Q09),count(that.G03Q10)),sum(count(that.G03Q09),count(that.G03Q10))-1)}
meaning: if there were "Others" you sum and calculate "-1".
This I'd insert into a hidden equation (let's call it eqCount).
Now you know how many items are ranked.
In the last question show all items as in the ranking question with subquestion relevances.
Think:
The 17 th rank can only be displayed if 17 items were ranked
The 16 th rank can only be displayed if 17 items or 16 items were ranked
The 15 th rank can only be displayed if 17, 16 or 15 items were ranked
The 14 th rank can only be displayed if 16, 15 or 14 items were ranked
...
Here the sample (the equation is not hidden, you have to do that after testing)
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 years 5 months ago by Joffm.
The topic has been locked.
- MBAK
- Topic Author
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 1
3 years 5 months ago #207928
by MBAK
Replied by MBAK on topic With EM generated text not shown as text but as EM equation in subsequent Qs
Hi Joffm
Many thanks again, this is nice!
You made me even realise, that i missed to think about the option, that there could be only 2 criteria choosen. With your sample i could solve this.
Thank you again.
Many thanks again, this is nice!
You made me even realise, that i missed to think about the option, that there could be only 2 criteria choosen. With your sample i could solve this.
Thank you again.
The topic has been locked.
- Joffm
- Away
- LimeSurvey Community Team
Less
More
- Posts: 12967
- Thank you received: 3989
3 years 5 months ago #207929
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic With EM generated text not shown as text but as EM equation in subsequent Qs
And - of course - you should not cose as it is shown in the screenshot.
But
SQ17: {G03Q11_17.shown}
SQ16: {G03Q11_16.shown}
The other would be very confusing.
Joffm
But
SQ17: {G03Q11_17.shown}
SQ16: {G03Q11_16.shown}
The other would be very confusing.
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.