Welcome, Guest
Username: Password: Remember me

TOPIC: Merge answers from 2 questions into 1 (for reporting)

Merge answers from 2 questions into 1 (for reporting) 11 months 3 weeks ago #99545

  • ctr
  • ctr's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
Hi,

I'm currently developing a customer survey for a company with multiple sub companies. To distinguish the subcompanies from each other I pass a custom parameter to the survey to identify the source. (e.g. url.com/.../newtest/Y/663448X6X26/sub1)

I cannot rely on the parameter to be present, so if it isn't I display a question prompting the user for the sub company.

How can I merge these 2 answers into one so when I display a report, I can filter the results by sub company? The logic would be something like
{ if(A0param == "sub1" OR A0custom == "Subcompany 1", "Subcompany 1", if(A0param == "sub2" OR ...) }

Where could I put a logic like this to have a single answer in the reporting table by which I can filter the answers for each sub company.

Or, alternatively, is there a possibility to use a boolean expression to filter the results in the report itself.
LimeSurvey Version 2.00+ Build 130802
The administrator has disabled public write access.

Merge answers from 2 questions into 1 (for reporting) 11 months 3 weeks ago #99568

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6272
  • Thank you received: 800
  • Karma: 240
Think:

2 question (text):

qcodeURL : hidden (only prefilled)
qcodeENTER : relevance is_empty(qcodeURL)

qcodeMerge : Equation : {join(qcodeURL.NAOK,qcodeENTER.NAOK)}

Denis
The administrator has disabled public write access.

Merge answers from 2 questions into 1 (for reporting) 11 months 2 weeks ago #99741

  • ctr
  • ctr's Avatar
  • OFFLINE
  • Fresh Lemon
  • Posts: 2
  • Karma: 0
Thank you, I didn't realize there's a question type Equation that fits exactly my needs.

However, I have now been collecting some internal sample data with this survey, and I find that when generating statistics within limesurvey, I do not get the option to filter the results based on the equation question. I can filter either by qcodeURL OR qcodeENTER (and it seems they are boolean AND merged, so I could't even say either or), but the equation question is not available for filtering. This kind of defeats the purpose, as I now have to generate the statistics externally.

I didn't find any info on which questions/question types are available for filtering and which are not (and why).

Any hints on how I could achieve this without having to export the result set and generate the graphs/statistics myself?
LimeSurvey Version 2.00+ Build 130802
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.153 seconds
Donation Image