List the Array type question subquestions with some Assessment values

Plus d'informations
il y a 1 mois 2 semaines - il y a 1 mois 2 semaines #174964 par iuriem
iuriem a créé le sujet : List the Array type question subquestions with some Assessment values
Hi,

I have an Array type question with 114 subquestions and six answer options valued from 1 to 6 (A1-A6). I need to list at the End message subquestions for which the answer options valued with 5 or 6 were selected (A5 or A6). Is this possible în LimeSurvey? Any suggestions would be appreciated. Thank you!

I know how to use the if statement, but for 114 subquestions this will be a very long code/solution.

My current version is 3.14.8+180829.
Dernière édition: il y a 1 mois 2 semaines par iuriem.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 2 semaines - il y a 1 mois 2 semaines #174968 par DenisChenu
DenisChenu a répondu au sujet : List the Array type question subquestions with some Assessment values
Yes it's possible :
use countifop and that.Qcode.NAOK

Something like
{sum(countifop("A5",that.qcode.NAOK),countifop("A6",that.qcode.NAOK))}

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 .
Dernière édition: il y a 1 mois 2 semaines par DenisChenu. Raison: manual link

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 2 semaines #174973 par iuriem
iuriem a répondu au sujet : List the Array type question subquestions with some Assessment values
Thank you! So, if my array type question is named 'schemas', the equation will be:
{sum(countifop("A5",that.schemas.NAOK),countifop("A6",that.schemas.NAOK))}

I added this equation to a equation type question, named 'test', right after the 'schemas' question, but it is not calculating anything, it just displays a 0, regardless of how many A5 or A6 answer options have been selected.
{test=sum(countifop("A5",that.schemas.NAOK),countifop("A6",that.schemas.NAOK))}

BTW, I am curious to learn something new, but realy I need to list the subquestions text, not to count them.
Pièces jointes :

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 2 semaines #174974 par DenisChenu
DenisChenu a répondu au sujet : List the Array type question subquestions with some Assessment values
I don't fix group [*] … sometimes lss …
please : send a screenshot of Survey Logic file

* : lsg file need for me to : create a survey with group language (currently unknow), import group.

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 .

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 2 semaines #174977 par iuriem
iuriem a répondu au sujet : List the Array type question subquestions with some Assessment values
You mean this?

Pièces jointes :

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 2 semaines #174979 par iuriem
iuriem a répondu au sujet : List the Array type question subquestions with some Assessment values
Pièces jointes :

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 2 semaines #174981 par DenisChenu
DenisChenu a répondu au sujet : List the Array type question subquestions with some Assessment values
If you want test to be filled by the value, remove the test= before …

Directly add
{sum(countifop("A5",that.schemas.NAOK),countifop("A6",that.schemas.NAOK))} in question text (or in equation settings : manual.limesurvey.org/Question_type_-_Eq...ation_.28equation.29 )

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 .

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 2 semaines #174982 par iuriem
iuriem a répondu au sujet : List the Array type question subquestions with some Assessment values
I already tested without 'test=', not working.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 2 semaines #174987 par DenisChenu
DenisChenu a répondu au sujet : List the Array type question subquestions with some Assessment values
Oups … countif , not countifop …

{sum(countif("A5",that.schemas.NAOK),countif("A6",that.schemas.NAOK))}

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 .
Les utilisateur(s) suivant ont remercié: iuriem

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 2 semaines #175001 par iuriem
iuriem a répondu au sujet : List the Array type question subquestions with some Assessment values
Thank you! It's not exactly what I wanted to do, but you showed me something I did not know. :)

I will ask a new question.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 2 semaines - il y a 1 mois 2 semaines #175004 par DenisChenu
DenisChenu a répondu au sujet : List the Array type question subquestions with some Assessment values
For your need : you can not use self …

Then : something like
{if(shemas_i001.NAOK == "A5" or shemas_i001.NAOK == "A6",shemas_i001.question)}
{if(shemas_i002.NAOK == "A5" or shemas_i002.NAOK == "A6",shemas_i002.question)}{if(shemas_i124.NAOK == "A5" or shemas_i124.NAOK == "A6",shemas_i124.question)}

You can't use implode sirectly here …

You can use list
{list(
if(shemas_i001.NAOK == "A5" or shemas_i001.NAOK == "A6",shemas_i001.question),
if(shemas_i002.NAOK == "A5" or shemas_i002.NAOK == "A6",shemas_i002.question),
…
if(shemas_i124.NAOK == "A5" or shemas_i124.NAOK == "A6",shemas_i124.question)
)}
but only `,` for separator …

Maybe with str_replace :
<ul><li>{str_replace(",","</li><li>",list(
if(shemas_i001.NAOK == "A5" or shemas_i001.NAOK == "A6",shemas_i001.question),
if(shemas_i002.NAOK == "A5" or shemas_i002.NAOK == "A6",shemas_i002.question),
…
if(shemas_i124.NAOK == "A5" or shemas_i124.NAOK == "A6",shemas_i124.question)
))}</li></ul>
If you have a comma in one question : it broke …

We really need a implodeif … it's not the 1st time i need it …

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 .
Dernière édition: il y a 1 mois 2 semaines par DenisChenu.
Les utilisateur(s) suivant ont remercié: iuriem

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 2 semaines #175007 par iuriem
iuriem a répondu au sujet : List the Array type question subquestions with some Assessment values
Thank you very much!

Yes, a 'implodeif' can help here.

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 1 semaine #175021 par DenisChenu
DenisChenu a répondu au sujet : List the Array type question subquestions with some Assessment values

iuriem écrit: Thank you very much!

Yes, a 'implodeif' can help here.

Time to make a feature request ;) : www.limesurvey.org/community/feature-requests

(but i think best feature is allow extend/add function in Expression Manager)

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 .

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 1 mois 1 semaine #175035 par jelo
jelo a répondu au sujet : List the Array type question subquestions with some Assessment values

DenisChenu écrit: (but i think best feature is allow extend/add function in Expression Manager)

bugs.limesurvey.org/view.php?id=14130

Are you a student conducting a survey? If yes, tell me why you use LimeSurvey?
www.limesurvey.org/forum/development/116...y-you-use-limesurvey
Les utilisateur(s) suivant ont remercié: DenisChenu

Connexion ou Créer un compte pour participer à la conversation.

Commencez dès maintenant !

Créez simplement un compte et commencez à utiliser LimeSurvey dès aujourd'hui.

Inscrivez-vous maintenant

Inscrivez-vous à notre Newsletter!