Coded Value Domains are not created for Select_One

3542
9
Jump to solution
09-08-2016 09:02 AM
JamieKelly1
Occasional Contributor

It seems that when I publish my form Coded Value Domains are created for Select_One type input, except when it is cascaded based on a selection from a previous, i.e (when there is a filter applied).

When looking a the feature table, the data contains the 'name' string which should not contain spaces or special characters.  All others will show the 'label' for the selected item.

Shouldn't the Coded Value Domain for these Select_One type inputs as well?

Thanks.

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
IsmaelChivite
Esri Notable Contributor

Hi. This behavior is expected. In early versions of Survey123 for ArcGIS we used to create domains for all select_ones. Very  soon people started  using cascading selects to handle lists of thousands of records and this caused issues when we were trying to create geodatabase domains for them. So we decided not to create domains for cascading selects.  It would be technically possible for us to present some advanced options during the Publishing process where you could have more control over this. If you feel strongly about this topic, please post a new IDEA in the Survey123 category and lets see what people think about it.

 Thanks!

Ismael

View solution in original post

9 Replies
IsmaelChivite
Esri Notable Contributor

Hi. This behavior is expected. In early versions of Survey123 for ArcGIS we used to create domains for all select_ones. Very  soon people started  using cascading selects to handle lists of thousands of records and this caused issues when we were trying to create geodatabase domains for them. So we decided not to create domains for cascading selects.  It would be technically possible for us to present some advanced options during the Publishing process where you could have more control over this. If you feel strongly about this topic, please post a new IDEA in the Survey123 category and lets see what people think about it.

 Thanks!

Ismael

JamieKelly1
Occasional Contributor

I used the administrative API to add the domain to the field and everything still seems to be working fine.

Thanks a lot.

0 Kudos
by Anonymous User
Not applicable

Hi, Ismael,

Q.  Is this still the case with the Survey123 version 2.1.9?  If it is so is there a workaround (my understanding is that Survey123 doesn't support creating a survey using existing Feature Layer)?. 

If Survey123 version 2.1.9 has capability adding domains for the select_one question, would you be able to point out where am I doing wrong or missing (please see the images below)?  I would like to save coded values to the Feature layer instead of "label" of created choices.  However, I haven't been successful.  I searched an answer for my particular problem, but I am having difficulty finding the answer.  I would very much appreciate your assistance.

Image 1: survey tab

Image 2: choices tab

Image 3:  Published feature layer - coded values are set in the published feature layer

Image 4: Collected data - I don't understand why it stores "label" instead of "code"...  

0 Kudos
IsmaelChivite
Esri Notable Contributor

Hi Makiko!

  • The behavior has not changed: Survey123 Connect will always create a domain for your select_one questions, except if your select_one has an expression in the choice_filter  column.  The choice_filter makes your question be a 'cascaded select'.
  • Select_ones will always persist the value in the NAME column of your XLSForm choice list.
  • IF a domain is present, ArcGIS clients will display the label rather than the NAME (coded value domain), but the actual stored value will always be the code. You can see this when downloading the data to CSV format for  example.  If you query programmatically your data you will also need to use  the codes.
  • You can create surveys from existing feature layers.  Check item 7 in https://community.esri.com/groups/survey123/blog/2017/04/10/10-facts-you-may-not-know-about-the-surv...  When doing this, you can actually build cascading selects that have domains.
0 Kudos
by Anonymous User
Not applicable

Hi Ismael,

Thank you so much for the quick response!!  I appreciate your detailed answers!!

>>You can create surveys from existing feature layers.

That is great!  However, what happens when existing feature layers have domains? 

0 Kudos
IsmaelChivite
Esri Notable Contributor

Hi Makiko. In the event that your feature layer as a coded value domain, we  will create its corresponding choice list in the choice worksheet and a select_one question for it. You can later  add a choice_filter to it if you want to make the cascading select effect.    Range value domains are ignored for now (in our backlog).  Subtypes are  also ignored.  So for example, if  you have 3 subtypes and each has its own domain they will be ignored.

FinnianO_Connor
Occasional Contributor II

Hi Ismael Chivite‌, after an survey is published and coded value domains have been created for select_one questions, if I go back and add a new value on the choices tab of my XLSForm and then republish from Connect should the coded value domain in a hosted feature layer (on AGOL) be updated?

I see the new value in the Survey123 form, however I'm not seeing it when I view the domain by following the instructions from How To: Add coded value domains to a hosted feature service in ArcGIS Online

I'm trying to create an Operations Dashboard which will filter data based on the field that has the coded value domain, however the new value doesn't show up.

Cheers.

Finnian

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Finnian,

Connect does not update the domain once published- you would need to manually add the additional values per the blog you linked to's instructions.

FinnianO_Connor
Occasional Contributor II

Thanks James, good to know

0 Kudos