Check out the LimeSurvey source code on GitHub!

List of variable names and their related questions

More
4 years 3 months ago #87609 by tfj
I am using the Expression Manager more, particularly for Equation-type questions. I haven't figured out an easy way to determine the proper variable name for a particular question/answer that I need in an equation.

For now, I have been setting up a condition using the question I need, looking at the resulting condition in the Relevance box for the proper variable name, then deleting the condition. I realize this is not ideal.

When I run a print-out of the survey, I can get a somewhat close approximation of what the variable name should be, but not close enough to use.

Can anyone suggest a more efficient way to determine variable names and their related questions?

I am using version 1.92+, Build 120919.

Thanks.

tfj

Please Log in to join the conversation.

More
4 years 3 months ago #87643 by tfj
To clarify my previous post with an example, let's say that you are using an "Array dual scale" question type. It isn't enough to reference the question in an equation merely with the Question Code. When referencing one part of the question (for instance, the first scale), you would need to reference "AnswerCode_SQ001_0.NAOK."

Other answer types require different references.

Thanks!

tfj

Please Log in to join the conversation.

More
4 years 3 months ago #87646 by mdekker
Did you try the survey logic file? It is in the menu with the paper sheet and a pencil (survey properties) and is the last item in the list.

---
Menno Dekker

Please Log in to join the conversation.

More
4 years 3 months ago #87649 by tfj
mdekker:

Thank you for the suggestion. I have been using the Survey Logic file constantly since it first came out -- it is a great and useful debugger.

It did not occur to me to use it for the purpose of determining variable names, but after looking at it again, I can see how it is almost what I was looking for. I will just need to assemble the variable names from the components listed.

Thank you, again!

tfj

Please Log in to join the conversation.

More
4 years 3 months ago #87676 by DenisChenu

tfj wrote: For now, I have been setting up a condition using the question I need, looking at the resulting condition in the Relevance box for the proper variable name, then deleting the condition. I realize this is not ideal.

I use same workaround :whistle: .

Or i use LimeReplacementField (popu editor mode) to copy/paste the code :side:

Denis

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form