- Posts: 53
- Thank you received: 6
- Forum
- English support forums
- Can I do this with LimeSurvey?
- Ranking question type and Expression manager.
Ranking question type and Expression manager.
4 years 2 months ago #144533
by vkuzmin
Ranking question type and Expression manager. was created by vkuzmin
I am figuring out what can be done with the Ranking questions.
For example i make question with code Ranking1. Limesurvey stores the result as follows:
Ranking1_1.NAOK - code (type "A1") of the upper member of the right-hand column.
Ranking1_1.shown - text description of the uppermost element of the right-hand column.
Ranking1_2- second top element of the right column, and so on. D.
I need help:
-How to count elements? In that question i can use "{count(self.NAOK)}", but what i should type in another question's equations? "{count(Range1_1,Range1_2,Range1_3,Range1_4,...,Range1_20.NAOK)}"?
-How To determine which elements are remain in the left column?
-How To determine on which position is an element, if you know his code? For example, I was primarily interested in the A6 and A8 products and I want to ask clarifying questions if they fall under the top 5.
I apologize in advance for the poor knowledge of the English language
For example i make question with code Ranking1. Limesurvey stores the result as follows:
Ranking1_1.NAOK - code (type "A1") of the upper member of the right-hand column.
Ranking1_1.shown - text description of the uppermost element of the right-hand column.
Ranking1_2- second top element of the right column, and so on. D.
I need help:
-How to count elements? In that question i can use "{count(self.NAOK)}", but what i should type in another question's equations? "{count(Range1_1,Range1_2,Range1_3,Range1_4,...,Range1_20.NAOK)}"?
-How To determine which elements are remain in the left column?
-How To determine on which position is an element, if you know his code? For example, I was primarily interested in the A6 and A8 products and I want to ask clarifying questions if they fall under the top 5.
I apologize in advance for the poor knowledge of the English language
The topic has been locked.
4 years 2 months ago - 4 years 2 months ago #144545
by vkuzmin
but its horrible way.
Replied by vkuzmin on topic Ranking question type and Expression manager.
I think i can do it with strpos and implode:vkuzmin wrote: -How To determine on which position is an element, if you know his code? For example, I was primarily interested in the A6 and A8 products and I want to ask clarifying questions if they fall under the top 5.
{A6check=if(strpos(implode("",Ranking1_1,Ranking1_2,Ranking1_3,Ranking1_4,Ranking1_5,Ranking1_6,Ranking1_7,Ranking1_8,Ranking1_9,Ranking1_10),"A6")/2 > 5,"Y","N")}
Last edit: 4 years 2 months ago by vkuzmin.
The topic has been locked.
- DenisChenu
-
- Away
- LimeSurvey Community Team
-
Less
More
- Posts: 14012
- Thank you received: 2476
4 years 2 months ago #144598
by DenisChenu
For other, strpos can be a good idea, maybe with list(that.Range1.NAOK). But still tricky
See
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.
Replied by DenisChenu on topic Ranking question type and Expression manager.
{count(that.Range1.NAOK)} (see this/self/that )vkuzmin wrote: -How to count elements? In that question i can use "{count(self.NAOK)}", but what i should type in another question's equations? "{count(Range1_1,Range1_2,Range1_3,Range1_4,...,Range1_20.NAOK)}"?
For other, strpos can be a good idea, maybe with list(that.Range1.NAOK). But still tricky
See
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.