Merge answers from 2 questions into 1 (for reporting)

More
3 years 11 months ago #99545 by ctr
ctr created the topic: Merge answers from 2 questions into 1 (for reporting)
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

Please Log in to join the conversation.

More
3 years 11 months ago #99568 by DenisChenu
DenisChenu replied the topic: Merge answers from 2 questions into 1 (for reporting)
Think:

2 question (text):

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

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

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).
An error happen ? Before make a new topic : remind the Debug mode .

Please Log in to join the conversation.

More
3 years 11 months ago #99741 by ctr
ctr replied the topic: Merge answers from 2 questions into 1 (for reporting)
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

Please Log in to join the conversation.

Did you already participate in our customer survey?

Don't miss your chance for great prices.

Please click here to participate:

Start now

Start now!

Just create your account and start using Limesurvey today.

Register now