Select one if

3081
9
12-15-2017 11:18 AM
AdamDaily
Occasional Contributor II

I have a large list of assets that have the same field schema but different attributes values. I don't want to create duplicate fields (one for each asset type that asks the same question) to collect data if 1 field works for all assets. Is it possible to use a single select one field that would change the select one options based on an answer to a previous question? Or, add a relevant statement to each value in a list_name? Some way to model what subtypes reading from a selected domain value in arcmap would do.

If answer to question 1 = A, question 2 (my select_one question) shows only options from list_name A

If answer to question 1 = B, the same question 2 shows only options from list_name B. And so on... 

0 Kudos
9 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Adam,

Survey123 supports having a select_one's list be filtered based on previous information via cascading selects.  See Cascading and external selects—Survey123 for ArcGIS | ArcGIS  and Cascading Selects and External Selects for more information.

AdamDaily
Occasional Contributor II

Thanks James,

Great to see Survey has this functionality, that will be very useful. One follow-up, if only half of my assets have lists I can pull from, can I manually enter text into the same field for those other assets that do not?

0 Kudos
by Anonymous User
Not applicable

Hi Adam,

Yes, you can use a "select_one "listname" or other" field type. This will create an additional field called "Specify other" if your feature service and then allows the user to select other from the drop down list, and populate the associated text field.

Here are some resources on the use of other: XLSForm essentials—Survey123 for ArcGIS | ArcGIS  and https://community.esri.com/groups/survey123/blog/2017/12/01/another-other-in-survey123.

Regards,

Phil.

0 Kudos
AdamDaily
Occasional Contributor II

I've tried this option but get a converting XLS Form ERROR "There should be choices for this question".

I am using a choice filter on this select_one to trigger drop-down lists based on a previously answered question where those answers have defined choice lists. Some answers do not have a list, and in those cases the or_other would be a great solution to having to add an additional "other" field and set relevant conditions on both fields. When I remove my choice filter the or_other works, but is it possible to use or_other in conjunction with select questions that use cascading selects?

0 Kudos
by Anonymous User
Not applicable

Hi Adam,

Choice filters are not supported on "or_other" question types. The filter will only work on select_one with defined set of values. There are other ways you could try to combine the select_one and other into one field, and then filter the following questions based on this one final combined field. You will need to use null field type and hidden questions. See examples here: https://community.esri.com/message/726814-re-auto-populate-skipped-questions-with-not-applicable?com...  or https://community.esri.com/message/726815-re-adding-a-value-such-as-not-relevant-to-a-conditional-qu... 

Regards,

Phil.

AdamDaily
Occasional Contributor II

Thank you I will look into these other methods.

How about setting default values to select one questions where most answers are 1 type, but a list of options is still needed? Or using pull data functions with select one? In my case, I need to collect new features, but I also have an incomplete dataset of existing features Id like to auto-populate known attributes for into my survey (many questions are select one). I heard earlier this year these types of functionality were being discussed, just wondering if they are still being looked at as possible future survey enhancements?

0 Kudos
by Anonymous User
Not applicable

Yes default values and pulldata() functions can be used on select one question types, or on following questions based on the answer of a select one.

I'm not sure I fully understand what you mean here "in my case, I need to collect new features, but I also have an incomplete dataset of existing features Id like to auto-populate known attributes for into my survey".

The only way we support incomplete choice lists (lookup lists) is using the 'or_other' option. We do not support building up choice lists on the fly (adding to them) as the survey is being completed and then having those new values added to choice list to be able to be selected in a following questions from same choice list. Is that what you meant?

Regards,

Phil.

0 Kudos
AdamDaily
Occasional Contributor II

If I try to pull data to fill in select one questions for features that I have partial data for, I can not apply a pull data calculation to a select one question type. If I select a choice in question 1 (any choice selected in question 1 has the same result), it breaks the rest of the survey. I can not continue past question 1 unless I remove the pull data calculation from question 2.

select one question 1 = A

select one question 2, Calculation: pull data from table A

0 Kudos
by Anonymous User
Not applicable

Hi Adam,

As per the documentation on the pulldata function, it is not supported on select_one question types. The pulldata() function can only be used to populate a label (including a note question), a text question, or a calculate question.

More info on pulldata can be found here: Formulas—Survey123 for ArcGIS | ArcGIS 

For cascading selects and limiting chopice lists based on previous questions you should be using Cascading and external selects—Survey123 for ArcGIS | ArcGIS  and Cascading Selects and External Selects as has previously be pointed out.

Phil.

0 Kudos