Welcome, Guest
Username: Password: Remember me

TOPIC: Is it possible to declare a variable?

Is it possible to declare a variable? 4 months 2 days ago #102563

  • ancosema
  • ancosema's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 9
  • Karma: 0
Hello,

I would like show an overview of the already answered questions at the beginning of the (restarted) and the end of the survey. The problem is that in the beginning the variables are not yet declared (message: variable declared in a later page) and the survey visitor sees an error message. So how do I check if the variable is declared or not? Is it possible to check for the existence of a variable?

Thanks for any answer!
Anja
The administrator has disabled public write access.

Is it possible to declare a variable? 4 months 1 day ago #102596

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 3813
  • Thank you received: 683
  • Karma: 328
You cannot access variables (questions) on pages (groups) that have not been visited yet, even if you are returning to the survey.
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.
The administrator has disabled public write access.

Is it possible to declare a variable? 4 months 1 day ago #102600

  • ancosema
  • ancosema's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 9
  • Karma: 0
Hello,

Thanks for the answer.

Is there a way to detect if a variable is not declared yet, because that would mean that the question has not been answered yet which is something that I can show in the overview in the beginning of the survey?

Or is there another way to show a list of which questions have been answered and which have not been answered yet?

Thanks,
Anja
The administrator has disabled public write access.

Is it possible to declare a variable? 4 months 1 day ago #102602

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 3813
  • Thank you received: 683
  • Karma: 328
A question variable is not declared when the question is answered - it is declared when it's parent page (group) is visited.
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.
The administrator has disabled public write access.

Is it possible to declare a variable? 4 months 1 day ago #102604

  • ancosema
  • ancosema's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 9
  • Karma: 0
Thanks again for the answer...

So is there a way to check whether the variable has been declared already because in my case the question group only has one question so it's still useful to be able to check whether the question has been shown already (even in a previous start of the survey)?

Thanks
The administrator has disabled public write access.

Is it possible to declare a variable? 4 months 1 day ago #102605

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 3813
  • Thank you received: 683
  • Karma: 328
I'm sorry, I can't help.
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.
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.096 seconds
Donation Image