Quantcast
Channel: Topics in Category: Can I do this with LimeSurvey? - LimeSurvey forums
Viewing all articles
Browse latest Browse all 17529

question text - by: tpartner

$
0
0
The IF statements work like this:

{if(condition, 'Returned result if true', 'Returned result if false')}

If nesting (multiple IF statements) is necessary, replace 'Returned result if false' with another complete IF statement like this (line-breaks inserted for clarity):

{if(condition1, 'Returned if true',
	if(condition2, 'Returned if true',
		if(condition3, 'Returned if true',
			if(condition4, 'Returned if true',
				if(condition5, 'Returned if true', 'Returned if all conditions false'
))))}

So, in your example, it would be like this (line-breaks inserted for clarity):

{if(random == 1, 'Text string 1.',
	if(random == 2, 'Text string 2.',
		if(random == 3, 'Text string 3.',
			if(random == 4, 'Text string 4.',
				'Text string 5.'
))))}

Viewing all articles
Browse latest Browse all 17529

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>