How to display subtype descriptions in web map popup?

2348
2
Jump to solution
06-15-2018 09:37 AM
NickDierks1
Occasional Contributor II

I set up a feature class for code violations that uses a subtype to populate a field with a specific category based on what violation is selected. I published the data as a hosted feature layer to be used in an interactive web map (and, eventually, Collector), but in the popup, the violations subtype only shows the integer values and not the descriptions.

Is there a way to change this, without writing a huge expression of nested "If ## then ____"? Or should I have set up my data differently?

0 Kudos
1 Solution

Accepted Solutions
NickDierks1
Occasional Contributor II

I had forgotten about this question--I've actually got it working now. I went through a few iterations and restarts with my data, so I'm not 100% sure exactly what did it, but here's my current setup that's working:

  • The field set as a subtype is a Short Integer field. This field has a coded value domain applied--the domain is for field type Short. The aliases of the number codes are the text descriptions I want (0 for Grass, 10 for Garbage, etc).
  • The subtype field updates a Text field. This text field has a second coded value domain applied. Here, the values and aliases are matching text descriptions (Debris / Debris, e.g.).

I don't believe I had a domain assigned to that Text field before, so applying it seems to have done the trick. I'm not sure why, because it was the subtype field that wasn't displaying properly.

If, for whatever reason, that doesn't solve it for you, I do have a third coded value domain. None of my fields currently use it; I had created it at some point and then never got around to deleting it. It's identical to the first domain (0 / Grass etc), but it's set up for a Text field type instead of a Short. I doubt this is having any effect on my situation, but I wanted to throw it out there in case it's solving something in some weird way.

I'm going to go ahead and mark this answer as correct for my question. If it doesn't solve yours, I would suggest posting a new question detailing your setup, and maybe someone will be able to answer it. I wouldn't know how to troubleshoot this any further if it doesn't work.

View solution in original post

0 Kudos
2 Replies
JaromHlebasko
Occasional Contributor III

I too am having the same issue and would love to know if there is a workaround for this if it is a bug.

0 Kudos
NickDierks1
Occasional Contributor II

I had forgotten about this question--I've actually got it working now. I went through a few iterations and restarts with my data, so I'm not 100% sure exactly what did it, but here's my current setup that's working:

  • The field set as a subtype is a Short Integer field. This field has a coded value domain applied--the domain is for field type Short. The aliases of the number codes are the text descriptions I want (0 for Grass, 10 for Garbage, etc).
  • The subtype field updates a Text field. This text field has a second coded value domain applied. Here, the values and aliases are matching text descriptions (Debris / Debris, e.g.).

I don't believe I had a domain assigned to that Text field before, so applying it seems to have done the trick. I'm not sure why, because it was the subtype field that wasn't displaying properly.

If, for whatever reason, that doesn't solve it for you, I do have a third coded value domain. None of my fields currently use it; I had created it at some point and then never got around to deleting it. It's identical to the first domain (0 / Grass etc), but it's set up for a Text field type instead of a Short. I doubt this is having any effect on my situation, but I wanted to throw it out there in case it's solving something in some weird way.

I'm going to go ahead and mark this answer as correct for my question. If it doesn't solve yours, I would suggest posting a new question detailing your setup, and maybe someone will be able to answer it. I wouldn't know how to troubleshoot this any further if it doesn't work.

0 Kudos