Select to view content in your preferred language

How to add text to choices in Survey123 Connect without changing domain label?

564
8
Jump to solution
07-16-2025 10:56 AM
AndrewWallick
Frequent Contributor

We have surveys that use coded value domains, and want to keep the coded value the same as the description (or label as I believe it's called in Online). But our users are asking to have text next to each choice explaining what that choice means.

So for example, right now we might have a question with choices:

N, S, E, W

Is it possible to make the answers display as the following, without actually changing the description/label of the domain?

N (North)

S (South)

E (East)

W (West)

0 Kudos
2 Solutions

Accepted Solutions
ChristopherCounsell
MVP Frequent Contributor

I'm pretty sure you can just use the wrong labels in the form as long as the coded value is correct.

E.g. In Connect

  • Publish survey with choice list of desired code/description, or otherwise create the layer
  • Change the labels in the list and republish the survey 
  • You'll get a warning, but should be ok to publish
  • Users will see the (incorrect) label in the form but the edit will use the coded value.
  • Viewing submitted data will use the actual domain values descriptions on the layer.

Otherwise you can:

  • Add a hint to the question 
  • Add a guidance hint to the question 
  • Add a note question to explain how to fill out one or more questions in the form 

View solution in original post

CalvinHarmin
Frequent Contributor

I can confirm this is something I do. I use Survey123 Connect. I have 3 surveys that are for different 'audiences' that technically point to the same hosted feature layer. The hosted feature layer has at least 1 field with domain/list of code/description values. One of my survey versions has different 'description' values set and it does show a warning when republishing that these do not match the domain/list schema of the layer, but it can be ignored since the code-values are the same and essentially just provides a different description visually for the form user. 

View solution in original post

8 Replies
Neal_t_k
Frequent Contributor

Short of changing the label, have you considered adding a legend/key for your codes.  If the lists are short you could use a hint or guidance_hint, If the list is longer you could make a notes field (make it relevant to save space) to add a key.

What's the main issue with adding it to the label, out of curiosity? That's kind of what the label is for.

0 Kudos
AndrewWallick
Frequent Contributor

Yeah using a hint is our backup plan. 

We don't like having labels different from their codes, because too often we've had people field calc or otherwise add data that matched the label rather than the code. So our data ends up being messy, with a mix of the codes and labels in the same field.

0 Kudos
Neal_t_k
Frequent Contributor

It appears what you are ultimately looking for to enforce your domains are "Attribute Rules" I haven't done it but it appears you can apply them in ArcGIS Pro, but it does not look like it has been implemented in ArcGIS Online yet.

https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/attribute-rule-script-expre...

https://community.esri.com/t5/arcgis-online-ideas/support-for-attribute-rules-in-arcgis-online/idi-p...

 

0 Kudos
ChristopherCounsell
MVP Frequent Contributor

I'm pretty sure you can just use the wrong labels in the form as long as the coded value is correct.

E.g. In Connect

  • Publish survey with choice list of desired code/description, or otherwise create the layer
  • Change the labels in the list and republish the survey 
  • You'll get a warning, but should be ok to publish
  • Users will see the (incorrect) label in the form but the edit will use the coded value.
  • Viewing submitted data will use the actual domain values descriptions on the layer.

Otherwise you can:

  • Add a hint to the question 
  • Add a guidance hint to the question 
  • Add a note question to explain how to fill out one or more questions in the form 
CalvinHarmin
Frequent Contributor

I can confirm this is something I do. I use Survey123 Connect. I have 3 surveys that are for different 'audiences' that technically point to the same hosted feature layer. The hosted feature layer has at least 1 field with domain/list of code/description values. One of my survey versions has different 'description' values set and it does show a warning when republishing that these do not match the domain/list schema of the layer, but it can be ignored since the code-values are the same and essentially just provides a different description visually for the form user. 

AndrewWallick
Frequent Contributor

Thanks, I'll give this a shot!

Neal_t_k
Frequent Contributor

@ChristopherCounsell and @CalvinHarmin, No matter what you do in the survey, if you go to the data AGOL and do a field calculation you can bypass the coded domain, how to constrain those types of edits is what @AndrewWallick is asking. Do either of you have any insight on that?  I see it is possible in ArcGIS Pro, but currently appears it won't transfer to ArcGIS online.

0 Kudos
CalvinHarmin
Frequent Contributor

If I'm not mistaken (i.e. in my testing/experience in ArcGIS Pro (I'm on 3.2)), the Field Calculate tool is a kind of 'brute force edit' that will not validate values with a domain before applying updates, both for gdb and AGOL sources.


EDIT: I see now that the Field Calculate in ArcGIS Pro has an 'Enforce Domains' parameter you can check. That seems to work for me to prevent writing any value that is not in the domain code list. Trying to write the correct 'description' value will not work, it seems to only allow the code (case sensitive).