I have a hosted feature layer for utility pipes that contain a field for pipe diameters (number field, type - double). Somehow the field values have changed to ranges, like 6" - 8" and it messed up a map that had this layer styled by size.
I redid the layer style in the map, and it did see the actual pipe sizes, also the labeling is working with the correct sizes.
Back in the layer's Data Tab, the attributes are still shown in the range values though. It's like the system is trying to automatically sort things for me, but I don't want it to...
I also can't create a list for this field, the Create List option is not available.
Any ideas what might be wrong with this layer/field.
I suspect that there is already a list on that field.
In item details, data tab, select that feature class, then the fields button, select the diameter Field and see if there is an "List of Values" with an edit option.
Creating a list is not available in the Data-Field Tab. The button is not there.
But once you select the "Fields" tab, you should see the list of fields in the layer.
Click on the field you want to add the list to and you should either see the option to edit the existing list (as above), or "Create List".
The 'Create List' option is not available to this field for some reason. I wish it was, because that would solve my issue.
The weird thing is that there is a drop down for that field when I load the layer into a map. The drop down options are useless, because they contain the ranges (4"-6", 6"-12", etc.) and not values (4", 6" 8", etc.).
What about just below what you captured in the snaphot above (below Settings)?
Since you are seeing the drop down options, would suspect that there is already a list associated with it. If so, should be below what you snapshot:
And, should be able to edit it (I am owner of all the HFL I tested with).
However, I am noticing that I do NOT have the option on hosted views (need to make the change on the original HFL itself) and, if I add an item to AGOL from a mapservice (not hosted), the option to modify the "list" isn't available.
That's the problem, the list option is not there. I am the owner of the hosted feature layer and there are other fields in this layer that I have added list to already. This particular field is just being troublesome.
Sorry, that is beyond me then. My HFLs don't behave that way.
May need to contact tech support for more help on this one.
You may want to check the json in the REST service to see what it has. The lists are in the "fields" : section.
Also, pretty easy to update the Domain/List with the python API if you need to go that route.
I use the code found here quite frequently in a Notebook to update/reorder my list.