Select to view content in your preferred language

Combine 2 surveys

2015
5
Jump to solution
02-18-2019 05:26 PM
Dionisiobattad
Regular Contributor

Hi,

I have created 2 surveys  - operational sampling and long term sampling. The first part of each survey are similar. They only differ in the 2nd part.

I would like to combine them in such a way that there is a query before the 2nd part. Depending on the response, the appropriate series of questions then become relevant in the 2nd part.

"For example: Do you want to do an operational sampling or long term sampling? If the response is operational, the relevant series of questions are used. If the response is long term, then the relevant questions are used."

How do I do this? Any help will be very much appreciated.

I have enclosed the 2 surveys. Many thanks.

Dionisio

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
PhilipQueen
Frequent Contributor

Dionisio battad‌, This is easily doable, especially if a user is only expected to fill out one at a time. Fill out the first section with the shared portion of the survey, then create a select_one question with the label "Do you want to do an operational sampling or long term sampling?" You can then add a choice in your choices list for operational sampling and another for long term sampling. 

If you want all of the second half to show up at once, make all the operational questions relevant to the answer above (in the relevant column: ${question name of sampling type} = operational), and do the same for long term. Depending on what your user chooses, they'll see either one survey or the other. If you want each question to appear one after the other, you only have to make the first questions following the choice relevant to it - any questions relevant to the question after the choice won't show up until it's been filled out. If it's confusing, map it out with a flow chart and look through an XLSForm guide here: Home 

And just to be clear - this would require you to republish as a new survey, or at least drop one of your surveys, so your existing data, if you have any, would be effected.

View solution in original post

5 Replies
PhilipQueen
Frequent Contributor

Dionisio battad‌, This is easily doable, especially if a user is only expected to fill out one at a time. Fill out the first section with the shared portion of the survey, then create a select_one question with the label "Do you want to do an operational sampling or long term sampling?" You can then add a choice in your choices list for operational sampling and another for long term sampling. 

If you want all of the second half to show up at once, make all the operational questions relevant to the answer above (in the relevant column: ${question name of sampling type} = operational), and do the same for long term. Depending on what your user chooses, they'll see either one survey or the other. If you want each question to appear one after the other, you only have to make the first questions following the choice relevant to it - any questions relevant to the question after the choice won't show up until it's been filled out. If it's confusing, map it out with a flow chart and look through an XLSForm guide here: Home 

And just to be clear - this would require you to republish as a new survey, or at least drop one of your surveys, so your existing data, if you have any, would be effected.

Dionisiobattad
Regular Contributor

Thanks, Philip. It worked in Survey123 Connect but when I publish it, I get an error code 500 - Error: Creating feature class failed. I tried it several times but I still get this.

0 Kudos
PhilipQueen
Frequent Contributor

Dionisio, are you publishing as a brand new survey, or republishing from an existing survey?

0 Kudos
Dionisiobattad
Regular Contributor

Hi Philip,

I was trying to publish it as a brand new survey. But I found a way around the problem. What I did was delete one of the surveys (still a prototype and did not contain any data). In Connect, I published the same survey but renamed it to the name of the combined survey that I wanted. Then edited the survey to include a select question, formatted the relevant field and the republished the survey. It overwrote the other one and did what I wanted to do.

Thanks for the help.

PhilipQueen
Frequent Contributor

I'm not sure why republishing an old survey would work better than a new one, but I'm glad it worked out!

0 Kudos