Ranking question type and Expression manager.

More
3 years 3 months ago #144533 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

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

LimeSurvey Partners
More
3 years 3 months ago - 3 years 3 months ago #144545 by vkuzmin

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.

I think i can do it with strpos and implode:
{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")}
but its horrible way.
Last edit: 3 years 3 months ago by vkuzmin.

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

More
3 years 2 months ago #144598 by DenisChenu

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)}"?

{count(that.Range1.NAOK)} (see this/self/that )

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 .
An error happen ? Before make a new topic : remind the Debug mode .

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!