Willkommen, Gast
Benutzername: Passwort: Angemeldet bleiben:

THEMA: Multiple Thank You Page/ Feedback on Survey

Multiple Thank You Page/ Feedback on Survey 1 Jahr 3 Wochen her #100304

  • ottawa_prof
  • ottawa_profs Avatar
  • OFFLINE
  • Fresh Lemon
  • Beiträge: 1
  • Karma: 0
I am currently using version 1.92+

I am working on a survey where participants will receive feedback based on 1 of the question groups. The feedback is based on a summed score from an array type question with 22 items.
As I understand from the manual to do this I would first create a hidden item that contains the total score. I did this by creating an equation question and summing each of the items. Here is my code:

sum(IES_IES1, IES_IES2, IES_IES3, IES_IES4, IES_IES5, IES_IES6, IES_IES7, IES_IES8, IES_IES9, IES_IES10, IES_IES11, IES_IES12, IES_IES13, IES_IES14, IES_IES15, IES_IES16, IES_IES17, IES_IES18, IES_IES19, IES_IES20, IES_IES21)

Following this I would create an "if" statement in my debriefing page referring to that equation question. Here is my code for that:
{if (EQ_IES <= 11,'Your response ...'if (EQ_IES < 32,'Your response... .'if (EQ_IES >= 33,'Your response ... .')))}

I have encountered the following difficulties and do not know why:
1. My equation, which I have not yet hidden yet, is continually 0, even though the responses on the array have non-zero responses. That is my equation does not seem to be calculating the sum. The logic file for this question does not show any errors. - I HAVE FIGURED OUT PART 1 OF MY PROBLEM - I NEED TO ADD .value, PART 2 STILL DOES NOT WORK
2. My if statement does not seem to work as when I test it I see all the if statements. The logic file for this question shows an error in the final if statement, but if I remove the spaces or anything there is no difference.
Letzte Änderung: 1 Jahr 3 Wochen her von ottawa_prof. Begründung: Part of problem solved.
Der Administrator hat öffentliche Schreibrechte deaktiviert.

Multiple Thank You Page/ Feedback on Survey 1 Jahr 3 Wochen her #100348

  • tpartner
  • tpartners Avatar
  • OFFLINE
  • LimeSurvey Team
  • Beiträge: 4272
  • Dank erhalten: 806
  • Karma: 369
It looks like you're missing some commas. A basic IF statement looks like this:
{if(something == something, 'Text if true', 'Text if false')}


So your nested IFs might look like this (with line-breaks for clarity):
{if (EQ_IES <= 11,
	'Your response ...', 
	if (EQ_IES < 32,
		'Your response... .',
		if (EQ_IES >= 33,
			'Your response ... .',
			'Whatever if this is false'
		)
	)
)}
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
Letzte Änderung: 1 Jahr 3 Wochen her von tpartner.
Der Administrator hat öffentliche Schreibrechte deaktiviert.
Moderatoren: ITEd
Ladezeit der Seite: 0.230 Sekunden
Donation Image