Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

condicionar pergunta com base no número de respostas em questão anterior

  • holch
  • holch's Avatar Topic Author
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 months 2 weeks ago - 10 months 2 weeks ago #244859 by holch
Primeiramente você precisa contar a quantidade de respostas marcadas na primeira pergunta para depois esconder a segunda caso que são menos de 4 opções marcadas.
Code:
{count(that.Q1.NAOK)}

Algo assim deveria te dar o número de respostas marcadas na "Q1". Eu sempre prefiro escrever este tipo de calculo dentro de uma pertunta do tipo "equation" (acho que se chama "formula" na gui em PT).

Mas provavemente você poderia usar isso diretamente na "relevance equation" da Q2, algo como:
Code:
if(count(that.Q1.NAOK)) > 3

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Last edit: 10 months 2 weeks ago by holch.

Please Log in to join the conversation.

  • holch
  • holch's Avatar Topic Author
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 months 2 weeks ago - 10 months 2 weeks ago #244866 by holch
Acho que as formulas que postei não funcionam. Estou testando aqui...
Corrigi as formulas no meu post, agora funciona.

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Last edit: 10 months 2 weeks ago by holch.

Please Log in to join the conversation.

  • holch
  • holch's Avatar Topic Author
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 months 2 weeks ago #244876 by holch
isso é um erro meu para incluir a formatação de citação e código fonte no forum, fiz um erro e misturei os dois ai o forum não mostra correto, claro.
Code:
if(count(that.Q1.NAOK)) > 3

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Please Log in to join the conversation.

  • holch
  • holch's Avatar Topic Author
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
10 months 2 weeks ago #244898 by holch
Why not simply (count(that.Q1.NAOK)) > 3?

This should give you the value 'true' for 4, 5, 6, etc and thus show the question when there are more than 3 subquestions checked in Q1

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose