If I publish a layer that has field names that are all upper case from our sde geodatabase as a map and feature service, the field names in both are all lower case. If I publish just as a map service, then the field names in the published map service are all upper case. I have publishing rights to our portal, and my machine is running 10.5.1.
If our administrator, who is also running 10.5.1, publishes from the same .mxd that I use, the feature service and map service both retain upper case field names. We use the same parameters for creating the services.
I have also tried excluding the kml option, but this has no effect.
You asked this question a while ago so I'm not sure if you've gotten this resolved at all? But if not, I do have some questions based on what you've written:
Thanks so much for the reply.
The field names are being converted to all lower case no matter if they start all upper case or if they are mixed. Also, other users publishing to our Portal are experiencing the same behavior. So I don’t think it is related to a particular .mxd. This is just a guess. Our Admin is running 10.5. I upgraded to 10.6 to see if that would fix it. It did not.
Our admin made me an admin. As admin, I republished, but the names are still coming out all lower case.
This is very puzzling.
We are going to add a new user to our portal and have them publish and see what happens.
Any thoughts would be appreciated. Thanks again.
I think you may be running into this bug:
It isn't fixed as of yet so you would still run into it with 10.6.1. I don't have a date that this is scheduled to be fixed unfortunately. If you wanted to test publishing the same data using the same user to AGOL and see what happens that may be a good test.
But it is a bit odd that your Admin user does not run into this issue. Let me know what happens with the new user.
The answer to this issue is that when publishing a service on portal, a Postgres database stores the attributes. The Postgres database automatically converts the field names to lower case. You will see the same issue if you are using GeoEvents which is why ESRI has included the Field Mapper tool to accommodate this issue.