Combine multiple choice answers with repeat

555
4
09-03-2018 03:03 AM
Nicole_Ueberschär
Esri Regular Contributor

I am developing a survey123 form regarding transportation. I want to find out how long the person was travelling by which means. I thought of using a multiple choice field first with means of transport (walk, bus, taxi, bike) and then a repeat which autofills automatically the chosen means of transport (_1, _2,_3...) from the question before and a integer field to give the minutes per means of transport. Is there a way to accomplish this?

0 Kudos
4 Replies
DanPatterson_Retired
MVP Emeritus

Repeats—Survey123 for ArcGIS | ArcGIS 

but there are other suggestions in that same general area of the help file

like creating default answers

Prepopulate answers—Survey123 for ArcGIS | ArcGIS 

0 Kudos
Nicole_Ueberschär
Esri Regular Contributor

Well, I know how to do multiple choice questions and also repeats. But the question is: how do I get the answers of my multiple choice question separated and then populated in my repeat answer?

0 Kudos
DanPatterson_Retired
MVP Emeritus

not following then.... I thought you had a base question with multiple choice answers, then you would repeat it and alter the correct choice answer as needed.  That would save you repeating the answer text multiple times.

If that isn't it, maybe an example

0 Kudos
Nicole_Ueberschär
Esri Regular Contributor

Let me give you an example. 

Question 1: Did you use other means of transport before going on this bus? 

Select_multiple Answer(s): Bus, walking

Repeat (if Answer to 1 is not empty):

   Question 2a : Means of transport

   Answer 2a (auto-populated from Q1): Bus

   Question 2b: How much time did you spend?

   Answer (integer)(in minutes): 20

end Repeat

I would like to set the number of repeats automatically to the number of selected answers in Q1. And Answer 2a should automatically populate from the answers of Q1. 

From the strategy I guess I would need to find out first if there were more than one answer selected in Q1 (which could be solved by looking for comma -> true/false). If true I guess I would need something to split up the string in Q1 at the comma and use the results separately in 2a. If false I could just use the answer from Q1 as default for 2a (plus readonly). 

Did it become a bit clearer now?

0 Kudos