- Posts: 48
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Impostare valori massimi diversi nelle domande a inserimento numerico
- FrancescaP
- Topic Author
- Offline
- Senior Member
Less
More
2 years 11 months ago #216161
by FrancescaP
Impostare valori massimi diversi nelle domande a inserimento numerico was created by FrancescaP
Buongiorno,
ho creato una domanda a inserimento numerico multiplo, ma vorrei impostare valori massimi diversi per ciascuna risposta.
La mia domanda prevede solo 2 risposte. La prima dovrebbe avere un valore massimo pari a 60, la seconda pari a 11. Come posso fare?
Grazie mille,
Francesca
ho creato una domanda a inserimento numerico multiplo, ma vorrei impostare valori massimi diversi per ciascuna risposta.
La mia domanda prevede solo 2 risposte. La prima dovrebbe avere un valore massimo pari a 60, la seconda pari a 11. Come posso fare?
Grazie mille,
Francesca
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12880
- Thank you received: 3964
2 years 11 months ago #216169
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Impostare valori massimi diversi nelle domande a inserimento numerico
BGuongiorno,
Validazione: Q1_SQ001 le 60 E Q1_SQ002 le 11
È questione di ore e minuti?
Forse un altro tipo di domanda: matrice (testi) con menu a discesa?
Validazione: Q1_SQ001 le 60 E Q1_SQ002 le 11
È questione di ore e minuti?
Forse un altro tipo di domanda: matrice (testi) con menu a discesa?
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- FrancescaP
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 48
- Thank you received: 0
2 years 11 months ago #216171
by FrancescaP
Replied by FrancescaP on topic Impostare valori massimi diversi nelle domande a inserimento numerico
The topic has been locked.
- lfanfoni
- Offline
- Platinum Member
Less
More
- Posts: 914
- Thank you received: 217
2 years 11 months ago #216173
by lfanfoni
Se mi vuoi contattare, non mandare messaggi privati qui, bensì scrivi a lfanfoni at gmail.com
Per le livestream in italiano vai su: www.youtube.com/playlist?list=PLOSjjxAG9...SiiCsSz_JxIH7xJwLdPd
Le soluzioni LimeSurvey per l'Italia si trovano su: github.com/lfanfoni
Replied by lfanfoni on topic Impostare valori massimi diversi nelle domande a inserimento numerico
Se sono alternative ti conviene prima chiedere se è più o meno di un anno e poi metti due domande una per gli anni e una per i mesi, ovviamente mostri una delle due in base alla scelta della domanda precedente
Se mi vuoi contattare, non mandare messaggi privati qui, bensì scrivi a lfanfoni at gmail.com
Per le livestream in italiano vai su: www.youtube.com/playlist?list=PLOSjjxAG9...SiiCsSz_JxIH7xJwLdPd
Le soluzioni LimeSurvey per l'Italia si trovano su: github.com/lfanfoni
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12880
- Thank you received: 3964
2 years 11 months ago #216176
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Impostare valori massimi diversi nelle domande a inserimento numerico
a. Equazione di convalida della domanda:
(count(self)==1) and (self.sq_SQ001<=60) and (self.sq_SQ002<=11)
b. Suggerimento di convalida della domanda:
{if(count(self.NAOK)==0,"Per favore rispondi alla domanda ",if(count(self.NAOK)==2,"Per favore, solo una risposta",if(self.sq_SQ001.NAOK>60,"Per favore, non più di 60 anni",if(self.sq_SQ002.NAOK>11,"Per favore, non più di 11 mesi ","Tutto bene"))))}
(count(self)==1) and (self.sq_SQ001<=60) and (self.sq_SQ002<=11)
b. Suggerimento di convalida della domanda:
{if(count(self.NAOK)==0,"Per favore rispondi alla domanda ",if(count(self.NAOK)==2,"Per favore, solo una risposta",if(self.sq_SQ001.NAOK>60,"Per favore, non più di 60 anni",if(self.sq_SQ002.NAOK>11,"Per favore, non più di 11 mesi ","Tutto bene"))))}
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- FrancescaP
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 48
- Thank you received: 0
2 years 11 months ago #216191
by FrancescaP
Replied by FrancescaP on topic Impostare valori massimi diversi nelle domande a inserimento numerico
I controlli funzionano, ma non riesco ad andare avanti col questionario. Dice che "non è stata fornita una risposta valida" pur avendo inserito i numeri giusti.
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12880
- Thank you received: 3964
2 years 11 months ago #216200
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Impostare valori massimi diversi nelle domande a inserimento numerico
Questo è facile da correggere.
Inserisci is_empty(...)
(count(self)==1) and (is_empty(self.sq_SQ001) OR self.sq_SQ001<=60) and (is_empty(self.sq_SQ002) OR self.sq_SQ002<=11)
Inserisci is_empty(...)
(count(self)==1) and (is_empty(self.sq_SQ001) OR self.sq_SQ001<=60) and (is_empty(self.sq_SQ002) OR self.sq_SQ002<=11)
Volunteers are not paid.
Not because they are worthless, but because they are priceless
The topic has been locked.
- cesoielampo
- Offline
- Junior Member
Less
More
- Posts: 27
- Thank you received: 2
2 years 11 months ago #216285
by cesoielampo
Replied by cesoielampo on topic Impostare valori massimi diversi nelle domande a inserimento numerico
Possibile che tu abbia impostato la domanda come obbligatoria?
Se imposti la domanda come obbligatoria LS si aspetta di avere entrambi i campi compilati, il che collide con l'equazione di validazione.
Se imposti la domanda come obbligatoria LS si aspetta di avere entrambi i campi compilati, il che collide con l'equazione di validazione.
The topic has been locked.
- FrancescaP
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 48
- Thank you received: 0
2 years 11 months ago - 2 years 11 months ago #216314
by FrancescaP
Replied by FrancescaP on topic Impostare valori massimi diversi nelle domande a inserimento numerico
Si, avevo impostato sia la domanda come obbligatoria che l'esclusività alle due opzioni oltre all'equazione. Adesso funziona tutto correttamente.
Grazie mille a tutti.
Grazie mille a tutti.
Last edit: 2 years 11 months ago by FrancescaP.
The topic has been locked.