I'm consuming a service that has symbology set up based on unique values of a particular field. The way the service is set up, each symbology type has a label different than the actual unique value (as an example, one value is "Anthropogenic_Oyster_Reef" which is labeled as "Man-Made Oyster Reef"). I have a legend which displays the labels of the various symbology types, but when a user clicks a feature they're going to see the actual field value ("Anthropogenic_Oyster_Reef") instead of the label we've provided in the legend ("Man-Made Oyster Reef"). This can be confusing for our users. Is there a way to retrieve the label of the feature when clicking it, or is my only option to edit the service so the field values match the desired labels?
I'm sure I could use some if statements to check for each possible field value and return the label name, but I feel like that would be extremely sloppy and there must be a better way.