Hello!
I have done some googling and have not been able to find anything about this. Is it possible to hide fields on a Feature Service as you publish them, the source being referenced data in SQL server.
Or do I have to maintain 2 copies of the same data, with one being a dialed back schema? Hiding them in the map is not adequate since this is a public map and of course the Services in it have to be as well.
You may want to consider using hosted feature layer views to control how the layer is displayed and hide fields. A view is created from an existing feature layer and references existing data but the settings and properties can be configured differently.
Here's a Technical Support Article on how to hide fields in a hosted feature layer in ArcGIS Online:
Huh ok, if I am reading the article linked inside the article you referenced, correctly a 'public' view can be created from a feature service shared to the 'organization'. It only talks about hosted feature services though. I wonder if it would work with a referenced one from ArcGIS Server/SQL, pulling the service in to AGOL from Portal using stored credentials. This is worth a try. Thank you!
...
Ah ok thank you! Hiding them before you publish the service does hide the fields after all? This route was actually my first thought, but I found another thread or two on here saying that doesn't actually hide them on the service, but cool! I will try it then, thank you.
...
And that 'visible' setting is tied to the map you used to public the redacted service only? Thats awesome. I will try this when I start rebuilding all our services in the next week or so. We are having to start from scratch because our 10.7.1 Portal user store/routing would break when we update it. ESRI couldn't figure out where the issue was. Thank you!