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)
Solved! Go to Solution.
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
Otherwise you can:
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.
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.
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.
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.
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
Otherwise you can:
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.
Thanks, I'll give this a shot!
@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.
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).