Newbie issue - xlsform and multiple select

106
1
Jump to solution
01-16-2021 09:09 AM
FredRick
New Contributor

I’m a first time Survey123 Connect user and am trying to figure out how to proceed with the following workflow issue. Basically I have xlsform working in a cascading select as follows:

 

survey worksheet

Type

Name

label

choice_filter

select_one country

country

What country do you live in?

 

select_one state

state

What state do you live in?

country=${country}

select_one duration or other

duration

How long have you lived in this state?

 

select_multiple cities

cities

What cities in this state have you lived in?

state=${state}

 

 

So to this point I’m happy with my form, but here I have my issue. I want user to be able to select between 1 and ~10 cities that they have lived in (provided in the choices worksheet) AND THEN have the form generate a table, grid, or similar that will populate one row per city selected in the table, grid or similar with:

 

 

Name of city

Did you live in this city?

Related question: Did you like this city?

 

If user selects 1 city, I want 1 row generated with the "Name of city" column populated and the “Did you live in this city?” column shown; if they select 7 cities, I want 7 rows generated with the "Name of city" column populated and the “Did you live in this city?” column shown. This question should also be a mandatory question.

 

Also, I want the related question "Did you like this city?" to only be shown if the answer to “Did you live in this city?” is Yes.

 

Any help is appreciated.

Reply
0 Kudos
1 Solution

Accepted Solutions
Alber_Verster
Esri Contributor

Hi,

How many cities are in your entire list? 

Fields will not be dynamically created based on the answer of a previous question so you would have to create a field for each city and have the logic that displays the field if the corresponding city name is selected in the 'select_multiple' question.

This could be an arduous task if you have hundred (if not thousands) of cities in your list.

I could advise using the repeat table to capture individual city's information where the user selects the city name from a dropdown option in the repeat table and then completes the questions per city. This way you would still use the cascading select function to filter the available city names but provide the user with a 'select_one' question when selecting the city name and complete the associated questions inside the repeat table.

 

View solution in original post

1 Reply
Alber_Verster
Esri Contributor

Hi,

How many cities are in your entire list? 

Fields will not be dynamically created based on the answer of a previous question so you would have to create a field for each city and have the logic that displays the field if the corresponding city name is selected in the 'select_multiple' question.

This could be an arduous task if you have hundred (if not thousands) of cities in your list.

I could advise using the repeat table to capture individual city's information where the user selects the city name from a dropdown option in the repeat table and then completes the questions per city. This way you would still use the cascading select function to filter the available city names but provide the user with a 'select_one' question when selecting the city name and complete the associated questions inside the repeat table.

 

View solution in original post